mirror of
https://github.com/geekfrog/PermissionsTime.git
synced 2024-11-22 15:48:51 +00:00
fix bugs
This commit is contained in:
parent
c884400781
commit
06c6c9af63
@ -41,9 +41,11 @@ public class MeCmd implements Runnable {
|
|||||||
sender.sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + "=====你共有{0}种权限包=====", ps.size()));
|
sender.sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + "=====你共有{0}种权限包=====", ps.size()));
|
||||||
for (PlayerDataBean pdb : ps) {
|
for (PlayerDataBean pdb : ps) {
|
||||||
PermissionPackageBean pc = PackagesCfg.PACKAGES.get(pdb.getPackageName());
|
PermissionPackageBean pc = PackagesCfg.PACKAGES.get(pdb.getPackageName());
|
||||||
|
if (pc != null) {
|
||||||
String expireString = StrUtil.timestampToString(pdb.getExpire());
|
String expireString = StrUtil.timestampToString(pdb.getExpire());
|
||||||
sender.sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + "权限包: {0}({1}), 到期时间: {2}", pc.getDisplayName(), pdb.getPackageName(), expireString));
|
sender.sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + "权限包: {0}({1}), 到期时间: {2}", pc.getDisplayName(), pdb.getPackageName(), expireString));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + "暂时无数据"));
|
sender.sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + "暂时无数据"));
|
||||||
}
|
}
|
||||||
|
@ -176,11 +176,13 @@ public class PermissionPackageBean implements IConfigBean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
PermissionPackageBean p = PackagesCfg.PACKAGES.get(pdb.getPackageName());
|
PermissionPackageBean p = PackagesCfg.PACKAGES.get(pdb.getPackageName());
|
||||||
|
if (p != null) {
|
||||||
addPpb.getPermissions().addAll(p.getPermissions());
|
addPpb.getPermissions().addAll(p.getPermissions());
|
||||||
subPpb.getPermissions().removeAll(p.getPermissions());
|
subPpb.getPermissions().removeAll(p.getPermissions());
|
||||||
addPpb.getGroups().addAll(p.getGroups());
|
addPpb.getGroups().addAll(p.getGroups());
|
||||||
subPpb.getGroups().removeAll(p.getGroups());
|
subPpb.getGroups().removeAll(p.getGroups());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
subPpb.clearPlayer(player, plugin.getServer(), plugin.getPermission());
|
subPpb.clearPlayer(player, plugin.getServer(), plugin.getPermission());
|
||||||
addPpb.givePlayer(player, plugin.getServer(), plugin.getPermission());
|
addPpb.givePlayer(player, plugin.getServer(), plugin.getPermission());
|
||||||
BukkitTask task = taskMap.get(player.getUniqueId().toString());
|
BukkitTask task = taskMap.get(player.getUniqueId().toString());
|
||||||
|
Loading…
Reference in New Issue
Block a user