1
1
mirror of https://github.com/geekfrog/PermissionsTime.git synced 2024-11-22 07:28:47 +00:00
This commit is contained in:
GeekFrog 2017-07-15 07:27:47 +08:00
parent c884400781
commit 06c6c9af63
2 changed files with 10 additions and 6 deletions

View File

@ -41,9 +41,11 @@ 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());
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 + "暂时无数据"));
}

View File

@ -176,11 +176,13 @@ public class PermissionPackageBean implements IConfigBean {
}
}
PermissionPackageBean p = PackagesCfg.PACKAGES.get(pdb.getPackageName());
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());
BukkitTask task = taskMap.get(player.getUniqueId().toString());