Make command blocks only select players on its world. Fixes BUKKIT-3515

This commit is contained in:
feildmaster 2013-01-28 17:01:08 -06:00
parent 132fdbc4ac
commit b0e43c8097

View File

@ -83,6 +83,9 @@ public class TileEntityCommand extends TileEntity implements ICommandListener {
EntityPlayer[] players = PlayerSelector.getPlayers(this, args[pos]); EntityPlayer[] players = PlayerSelector.getPlayers(this, args[pos]);
if (players != null) { if (players != null) {
for (EntityPlayer player : players) { for (EntityPlayer player : players) {
if (player.world != this.world) {
continue;
}
String[] command = args.clone(); String[] command = args.clone();
command[pos] = player.getLocalizedName(); command[pos] = player.getLocalizedName();
commands.add(command); commands.add(command);