diff options
Diffstat (limited to 'src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java index 455f3df0..f63300fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java +++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java @@ -35,16 +35,16 @@ public final class VanillaCommandWrapper extends VanillaCommand { protected final CommandAbstract vanillaCommand; public VanillaCommandWrapper(CommandAbstract vanillaCommand) { - super(vanillaCommand.c()); + super(vanillaCommand.getCommand()); this.vanillaCommand = vanillaCommand; } public VanillaCommandWrapper(CommandAbstract vanillaCommand, String usage) { - super(vanillaCommand.c()); + super(vanillaCommand.getCommand()); this.vanillaCommand = vanillaCommand; this.description = "A Mojang provided command."; this.usageMessage = usage; - this.setPermission("minecraft.command." + vanillaCommand.c()); + this.setPermission("minecraft.command." + vanillaCommand.getCommand()); } @Override @@ -57,14 +57,14 @@ public final class VanillaCommandWrapper extends VanillaCommand { WorldServer[] prev = MinecraftServer.getServer().worldServer; MinecraftServer.getServer().worldServer = new WorldServer[]{(WorldServer) icommandlistener.getWorld()}; try { - vanillaCommand.b(icommandlistener, args); + vanillaCommand.execute(icommandlistener, args); } catch (ExceptionUsage exceptionusage) { ChatMessage chatmessage = new ChatMessage("commands.generic.usage", new Object[] {new ChatMessage(exceptionusage.getMessage(), exceptionusage.a())}); - chatmessage.b().setColor(EnumChatFormat.RED); + chatmessage.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage); } catch (CommandException commandexception) { ChatMessage chatmessage = new ChatMessage(commandexception.getMessage(), commandexception.a()); - chatmessage.b().setColor(EnumChatFormat.RED); + chatmessage.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage); } finally { MinecraftServer.getServer().worldServer = prev; @@ -77,7 +77,7 @@ public final class VanillaCommandWrapper extends VanillaCommand { Validate.notNull(sender, "Sender cannot be null"); Validate.notNull(args, "Arguments cannot be null"); Validate.notNull(alias, "Alias cannot be null"); - return (List<String>) vanillaCommand.a(getListener(sender), args); + return (List<String>) vanillaCommand.tabComplete(getListener(sender), args); } public final int dispatchVanillaCommandBlock(CommandBlockListenerAbstract icommandlistener, String s) { @@ -95,7 +95,7 @@ public final class VanillaCommandWrapper extends VanillaCommand { WorldServer[] prev = MinecraftServer.getServer().worldServer; MinecraftServer.getServer().worldServer = new WorldServer[]{(WorldServer) icommandlistener.getWorld()}; try { - if (vanillaCommand.a(icommandlistener)) { + if (vanillaCommand.canUse(icommandlistener)) { if (i > -1) { EntityPlayer aentityplayer[] = PlayerSelector.getPlayers(icommandlistener, as[i]); String s2 = as[i]; @@ -105,12 +105,12 @@ public final class VanillaCommandWrapper extends VanillaCommand { EntityPlayer entityplayer = aentityplayer1[l]; as[i] = entityplayer.getName(); try { - vanillaCommand.b(icommandlistener, as); + vanillaCommand.execute(icommandlistener, as); j++; continue; } catch (CommandException commandexception1) { ChatMessage chatmessage4 = new ChatMessage(commandexception1.getMessage(), commandexception1.a()); - chatmessage4.b().setColor(EnumChatFormat.RED); + chatmessage4.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage4); l++; } @@ -118,34 +118,34 @@ public final class VanillaCommandWrapper extends VanillaCommand { as[i] = s2; } else { - vanillaCommand.b(icommandlistener, as); + vanillaCommand.execute(icommandlistener, as); j++; } } else { ChatMessage chatmessage = new ChatMessage("commands.generic.permission", new Object[0]); - chatmessage.b().setColor(EnumChatFormat.RED); + chatmessage.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage); } } catch (ExceptionUsage exceptionusage) { ChatMessage chatmessage1 = new ChatMessage("commands.generic.usage", new Object[] { new ChatMessage(exceptionusage.getMessage(), exceptionusage.a()) }); - chatmessage1.b().setColor(EnumChatFormat.RED); + chatmessage1.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage1); } catch (CommandException commandexception) { ChatMessage chatmessage2 = new ChatMessage(commandexception.getMessage(), commandexception.a()); - chatmessage2.b().setColor(EnumChatFormat.RED); + chatmessage2.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage2); } catch (Throwable throwable) { ChatMessage chatmessage3 = new ChatMessage("commands.generic.exception", new Object[0]); - chatmessage3.b().setColor(EnumChatFormat.RED); + chatmessage3.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage3); if(icommandlistener instanceof TileEntityCommandListener) { TileEntityCommandListener listener = (TileEntityCommandListener) icommandlistener; - MinecraftServer.av().log(Level.WARN, String.format("CommandBlock at (%d,%d,%d) failed to handle command", listener.getChunkCoordinates().x, listener.getChunkCoordinates().y, listener.getChunkCoordinates().z), throwable); + MinecraftServer.getLogger().log(Level.WARN, String.format("CommandBlock at (%d,%d,%d) failed to handle command", listener.getChunkCoordinates().x, listener.getChunkCoordinates().y, listener.getChunkCoordinates().z), throwable); } else if (icommandlistener instanceof EntityMinecartCommandBlockListener) { EntityMinecartCommandBlockListener listener = (EntityMinecartCommandBlockListener) icommandlistener; - MinecraftServer.av().log(Level.WARN, String.format("MinecartCommandBlock at (%d,%d,%d) failed to handle command", listener.getChunkCoordinates().x, listener.getChunkCoordinates().y, listener.getChunkCoordinates().z), throwable); + MinecraftServer.getLogger().log(Level.WARN, String.format("MinecartCommandBlock at (%d,%d,%d) failed to handle command", listener.getChunkCoordinates().x, listener.getChunkCoordinates().y, listener.getChunkCoordinates().z), throwable); } else { - MinecraftServer.av().log(Level.WARN, String.format("Unknown CommandBlock failed to handle command"), throwable); + MinecraftServer.getLogger().log(Level.WARN, String.format("Unknown CommandBlock failed to handle command"), throwable); } } finally { MinecraftServer.getServer().worldServer = prev; @@ -174,7 +174,7 @@ public final class VanillaCommandWrapper extends VanillaCommand { private int getPlayerListSize(String as[]) { for (int i = 0; i < as.length; i++) { - if (vanillaCommand.a(as, i) && PlayerSelector.isList(as[i])) { + if (vanillaCommand.isListStart(as, i) && PlayerSelector.isList(as[i])) { return i; } } |