mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 13:07:06 +01:00
Make command blocks only select players on its world. Fixes BUKKIT-3515
This commit is contained in:
parent
132fdbc4ac
commit
b0e43c8097
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue