diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-03-24 23:22:32 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-25 00:51:36 -0500 |
commit | 5f089137ee63505b85ee7ddf0e75cb797c835d41 (patch) | |
tree | 1a73488a61ae3bec6ae237b7c1d83652f211cdac /src/main/java/net/minecraft/server/TileEntityCommand.java | |
parent | 7c40a073d8b173dde3f7c13985b5b587e6158894 (diff) | |
download | craftbukkit-5f089137ee63505b85ee7ddf0e75cb797c835d41.tar craftbukkit-5f089137ee63505b85ee7ddf0e75cb797c835d41.tar.gz craftbukkit-5f089137ee63505b85ee7ddf0e75cb797c835d41.tar.lz craftbukkit-5f089137ee63505b85ee7ddf0e75cb797c835d41.tar.xz craftbukkit-5f089137ee63505b85ee7ddf0e75cb797c835d41.zip |
Cleanup comments, formatting, etc
Diffstat (limited to 'src/main/java/net/minecraft/server/TileEntityCommand.java')
-rw-r--r-- | src/main/java/net/minecraft/server/TileEntityCommand.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntityCommand.java b/src/main/java/net/minecraft/server/TileEntityCommand.java index 43e03e5e..0f9a38f7 100644 --- a/src/main/java/net/minecraft/server/TileEntityCommand.java +++ b/src/main/java/net/minecraft/server/TileEntityCommand.java @@ -2,7 +2,6 @@ package net.minecraft.server; // CraftBukkit start import java.util.ArrayList; -import java.util.Arrays; import com.google.common.base.Joiner; // CraftBukkit end @@ -31,7 +30,7 @@ public class TileEntityCommand extends TileEntity implements ICommandListener { MinecraftServer minecraftserver = MinecraftServer.getServer(); if (minecraftserver != null && minecraftserver.getEnableCommandBlock()) { - // CraftBukkit start - handle command block commands using Bukkit dispatcher + // CraftBukkit start - Handle command block commands using Bukkit dispatcher org.bukkit.command.SimpleCommandMap commandMap = minecraftserver.server.getCommandMap(); Joiner joiner = Joiner.on(" "); String command = this.b; @@ -41,19 +40,19 @@ public class TileEntityCommand extends TileEntity implements ICommandListener { String[] args = command.split(" "); ArrayList<String[]> commands = new ArrayList<String[]>(); - // block disallowed commands + // Block disallowed commands if (args[0].equalsIgnoreCase("stop") || args[0].equalsIgnoreCase("kick") || args[0].equalsIgnoreCase("op") || args[0].equalsIgnoreCase("deop") || args[0].equalsIgnoreCase("ban") || args[0].equalsIgnoreCase("ban-ip") || args[0].equalsIgnoreCase("pardon") || args[0].equalsIgnoreCase("pardon-ip") || args[0].equalsIgnoreCase("reload")) { return 0; } - // make sure this is a valid command + // Make sure this is a valid command if (commandMap.getCommand(args[0]) == null) { return 0; } - // if the world has no players don't run + // If the world has no players don't run if (this.world.players.isEmpty()) { return 0; } @@ -80,7 +79,7 @@ public class TileEntityCommand extends TileEntity implements ICommandListener { commands.add(args); - // find positions of command block syntax, if any + // Find positions of command block syntax, if any ArrayList<String[]> newCommands = new ArrayList<String[]>(); for (int i = 0; i < args.length; i++) { if (PlayerSelector.isPattern(args[i])) { @@ -96,10 +95,10 @@ public class TileEntityCommand extends TileEntity implements ICommandListener { int completed = 0; - // now dispatch all of the commands we ended up with + // Now dispatch all of the commands we ended up with for (int i = 0; i < commands.size(); i++) { try { - if (commandMap.dispatch(sender, joiner.join(Arrays.asList(commands.get(i))))) { + if (commandMap.dispatch(sender, joiner.join(java.util.Arrays.asList(commands.get(i))))) { completed++; } } catch (Throwable exception) { |