summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2013-01-28 17:01:08 -0600
committerfeildmaster <admin@feildmaster.com>2013-01-28 17:01:08 -0600
commitb0e43c809739d3521d7cd5e54bb5259886c50fb7 (patch)
tree34c74f8a9a3945dd01fab8f45729e83e74e7b7bb
parent132fdbc4ac9bdbef5cf22715f55db886d3c21b8f (diff)
downloadcraftbukkit-b0e43c809739d3521d7cd5e54bb5259886c50fb7.tar
craftbukkit-b0e43c809739d3521d7cd5e54bb5259886c50fb7.tar.gz
craftbukkit-b0e43c809739d3521d7cd5e54bb5259886c50fb7.tar.lz
craftbukkit-b0e43c809739d3521d7cd5e54bb5259886c50fb7.tar.xz
craftbukkit-b0e43c809739d3521d7cd5e54bb5259886c50fb7.zip
Make command blocks only select players on its world. Fixes BUKKIT-3515
-rw-r--r--src/main/java/net/minecraft/server/TileEntityCommand.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntityCommand.java b/src/main/java/net/minecraft/server/TileEntityCommand.java
index 357c5836..4ff401b0 100644
--- a/src/main/java/net/minecraft/server/TileEntityCommand.java
+++ b/src/main/java/net/minecraft/server/TileEntityCommand.java
@@ -83,6 +83,9 @@ public class TileEntityCommand extends TileEntity implements ICommandListener {
EntityPlayer[] players = PlayerSelector.getPlayers(this, args[pos]);
if (players != null) {
for (EntityPlayer player : players) {
+ if (player.world != this.world) {
+ continue;
+ }
String[] command = args.clone();
command[pos] = player.getLocalizedName();
commands.add(command);