1
1
mirror of https://github.com/geekfrog/PermissionsTime.git synced 2025-09-09 05:00:49 +00:00

支持跨服权限

This commit is contained in:
GeekFrog
2017-07-15 13:06:35 +08:00
parent 6b628c55cb
commit 56d0167386
15 changed files with 108 additions and 34 deletions

View File

@ -30,8 +30,12 @@ public class RemoveAllCmd implements Runnable {
@Override
public void run() {
if (args.length == 2) {
if (args.length == 2 || args.length == 3) {
String playerName = args[1];
boolean delGlobal = false;
if (args.length == 3 && "t".equalsIgnoreCase(args[2]) && PluginCfg.USE_MYSQL) {
delGlobal = true;
}
OfflinePlayer player = pm.getOfflinePlayer(playerName);
if (player != null) {
sender.sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + "执行中,请等待..."));
@ -39,7 +43,7 @@ public class RemoveAllCmd implements Runnable {
if (PluginCfg.IS_DEBUG) {
sender.sendMessage(StrUtil.messageFormat(PluginCfg.PLUGIN_PREFIX + uuid.toString()));
}
if (sm.removeAllTime(uuid.toString())) {
if (sm.removeAllTime((delGlobal ? "g:" : "") + uuid.toString())) {
if (player.isOnline()) {
Player p = player.getPlayer();
try {