1
0
mirror of https://e.coding.net/circlecloud/Residence.git synced 2024-10-31 22:38:48 +00:00

fix: 修复命令解析问题

This commit is contained in:
502647092 2016-04-22 01:06:16 +08:00
parent b64d05abb5
commit aead6ed983
24 changed files with 28 additions and 35 deletions

View File

@ -17,7 +17,7 @@ public class CommandCompass extends BaseCommand {
ResidenceMain plugin;
public CommandCompass(final ResidenceMain plugin) {
super("compass", "cp");
super("cp");
this.plugin = plugin;
setOnlyPlayerExecutable();
setDescription("切换指南针方向");

View File

@ -18,7 +18,7 @@ public class CommandCreate extends BaseCommand {
ResidenceMain plugin;
public CommandCreate(final ResidenceMain plugin) {
super("c", "new");
super("create", "new", "c");
this.plugin = plugin;
setMinimumArguments(1);
setOnlyPlayerExecutable();

View File

@ -16,7 +16,7 @@ public class CommandCurrent extends BaseCommand {
ResidenceMain plugin;
public CommandCurrent(final ResidenceMain plugin) {
super("current");
super();
this.plugin = plugin;
setOnlyPlayerExecutable();
}

View File

@ -15,7 +15,7 @@ public class CommandDefault extends BaseCommand {
ResidenceMain plugin;
public CommandDefault(final ResidenceMain plugin) {
super("default");
super();
this.plugin = plugin;
setMinimumArguments(1);
setOnlyPlayerExecutable();

View File

@ -14,7 +14,7 @@ public class CommandGive extends BaseCommand {
ResidenceMain plugin;
public CommandGive(final ResidenceMain plugin) {
super("give");
super();
this.plugin = plugin;
setMinimumArguments(2);
setOnlyPlayerExecutable();

View File

@ -18,7 +18,7 @@ public class CommandLease extends BaseCommand {
ResidenceMain plugin;
public CommandLease(final ResidenceMain plugin) {
super("lease");
super();
this.plugin = plugin;
setMinimumArguments(2);
setOnlyPlayerExecutable();

View File

@ -13,7 +13,7 @@ public class CommandLimits extends BaseCommand {
ResidenceMain plugin;
public CommandLimits(final ResidenceMain plugin) {
super("limits");
super();
this.plugin = plugin;
setOnlyPlayerExecutable();
}

View File

@ -14,7 +14,7 @@ public class CommandListAll extends BaseCommand {
ResidenceMain plugin;
public CommandListAll(final ResidenceMain plugin) {
super("listall");
super("la");
this.plugin = plugin;
setOnlyPlayerExecutable();
}

View File

@ -16,7 +16,7 @@ public class CommandListAllHidden extends BaseCommand {
ResidenceMain plugin;
public CommandListAllHidden(final ResidenceMain plugin) {
super("listallhidden");
super("lah");
this.plugin = plugin;
setOnlyPlayerExecutable();
}

View File

@ -16,7 +16,7 @@ public class CommandListHidden extends BaseCommand {
ResidenceMain plugin;
public CommandListHidden(final ResidenceMain plugin) {
super("listhidden");
super("lh");
this.plugin = plugin;
setOnlyPlayerExecutable();
}

View File

@ -17,7 +17,7 @@ public class CommandLists extends BaseCommand {
ResidenceMain plugin;
public CommandLists(final ResidenceMain plugin) {
super("lists");
super();
this.plugin = plugin;
setMinimumArguments(1);
setOnlyPlayerExecutable();

View File

@ -18,7 +18,7 @@ public class CommandLset extends BaseCommand {
ResidenceMain plugin;
public CommandLset(final ResidenceMain plugin) {
super("lset");
super();
this.plugin = plugin;
setMinimumArguments(2);
setOnlyPlayerExecutable();

View File

@ -28,7 +28,7 @@ public class CommandMarket extends BaseCommand {
TransactionManager tmanager;
public CommandMarket(final ResidenceMain plugin) {
super("market");
super();
this.plugin = plugin;
rmanager = plugin.getResidenceManager();
language = plugin.getLanguage();

View File

@ -15,7 +15,7 @@ public class CommandMaterial extends BaseCommand {
ResidenceMain plugin;
public CommandMaterial(final ResidenceMain plugin) {
super("material");
super();
this.plugin = plugin;
setMinimumArguments(1);
setOnlyPlayerExecutable();

View File

@ -18,7 +18,7 @@ public class CommandMessage extends BaseCommand {
ResidenceMain plugin;
public CommandMessage(final ResidenceMain plugin) {
super("message");
super();
this.plugin = plugin;
setMinimumArguments(1);
setOnlyPlayerExecutable();

View File

@ -14,7 +14,7 @@ public class CommandMirror extends BaseCommand {
ResidenceMain plugin;
public CommandMirror(final ResidenceMain plugin) {
super("mirror");
super();
this.plugin = plugin;
setMinimumArguments(2);
setOnlyPlayerExecutable();

View File

@ -20,7 +20,7 @@ public class CommandRemove extends BaseCommand {
ResidenceMain plugin;
public CommandRemove(final ResidenceMain plugin) {
super("remove", "delete");
super("delete");
this.plugin = plugin;
}

View File

@ -16,7 +16,7 @@ public class CommandRemoveAll extends BaseCommand {
ResidenceMain plugin;
public CommandRemoveAll(final ResidenceMain plugin) {
super("removeall");
super();
this.plugin = plugin;
setMinimumArguments(1);
setOnlyPlayerExecutable();

View File

@ -14,7 +14,7 @@ public class CommandRename extends BaseCommand {
ResidenceMain plugin;
public CommandRename(final ResidenceMain plugin) {
super("rename");
super("rn");
this.plugin = plugin;
setMinimumArguments(2);
setOnlyPlayerExecutable();

View File

@ -16,7 +16,7 @@ public class CommandSetOwner extends BaseCommand {
ResidenceMain plugin;
public CommandSetOwner(final ResidenceMain plugin) {
super("setowner");
super("so");
this.plugin = plugin;
setMinimumArguments(2);
setPossibleArguments("[领地名] [玩家]");
@ -35,10 +35,11 @@ public class CommandSetOwner extends BaseCommand {
if (area != null) {
area.getPermissions().setOwner(args[1], true);
if (area.getParent() == null) {
sender.sendMessage(ChatColor.GREEN + language.getPhrase("ResidenceOwnerChange", ChatColor.YELLOW + " " + args[0] + " " + ChatColor.GREEN + "." + ChatColor.YELLOW + args[1] + ChatColor.GREEN));
sender.sendMessage(
ChatColor.GREEN + language.getPhrase("ResidenceOwnerChange", ChatColor.YELLOW + " " + args[0] + " " + ChatColor.GREEN + "." + ChatColor.YELLOW + args[1] + ChatColor.GREEN));
} else {
sender.sendMessage(ChatColor.GREEN
+ language.getPhrase("SubzoneOwnerChange", ChatColor.YELLOW + " " + args[0].split("\\.")[args[1].split("\\.").length - 1] + " " + ChatColor.GREEN + "." + ChatColor.YELLOW + args[1] + ChatColor.GREEN));
sender.sendMessage(ChatColor.GREEN + language.getPhrase("SubzoneOwnerChange",
ChatColor.YELLOW + " " + args[0].split("\\.")[args[1].split("\\.").length - 1] + " " + ChatColor.GREEN + "." + ChatColor.YELLOW + args[1] + ChatColor.GREEN));
}
} else {
sender.sendMessage(ChatColor.RED + language.getPhrase("InvalidResidence"));

View File

@ -17,7 +17,7 @@ public class CommandTp extends BaseCommand {
ResidenceMain plugin;
public CommandTp(final ResidenceMain plugin) {
super("tp");
super();
this.plugin = plugin;
setMinimumArguments(1);
setOnlyPlayerExecutable();

View File

@ -17,7 +17,7 @@ public class CommandTpSet extends BaseCommand {
ResidenceMain plugin;
public CommandTpSet(final ResidenceMain plugin) {
super("tpset");
super();
this.plugin = plugin;
setOnlyPlayerExecutable();
}

View File

@ -19,7 +19,7 @@ public class CommandUnStuck extends BaseCommand {
ResidenceMain plugin;
public CommandUnStuck(final ResidenceMain plugin) {
super("unstuck");
super("us");
this.plugin = plugin;
setOnlyPlayerExecutable();
}

View File

@ -25,16 +25,8 @@ public class CommandVersion extends BaseCommand {
sender.sendMessage(ChatColor.GREEN + "创建者: " + ChatColor.YELLOW + "bekvon");
sender.sendMessage(ChatColor.GREEN + "升级到 1.8 by: " + ChatColor.YELLOW + "DartCZ");
sender.sendMessage(ChatColor.RED + "升级到最新无UUID版本 by: " + ChatColor.YELLOW + "喵♂呜");
String names = null;
final List<String> authlist = plugin.getDescription().getAuthors();
for (final String auth : authlist) {
if (names == null) {
names = auth;
} else {
names = names + ", " + auth;
}
}
sender.sendMessage(ChatColor.GREEN + "作者: " + ChatColor.YELLOW + names);
sender.sendMessage(ChatColor.GREEN + "作者: " + ChatColor.YELLOW + authlist.toArray().toString());
sender.sendMessage(ChatColor.DARK_AQUA + "插件命令列表,帮助, 请查看wiki:");
sender.sendMessage(ChatColor.GREEN + "http://residencebukkitmod.wikispaces.com/");
sender.sendMessage(ChatColor.AQUA + "重制版本请查看Jenkins:");