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