mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 20:30:28 +01:00
Make command blocks only select players on its world. Fixes BUKKIT-3515
This commit is contained in:
parent
132fdbc4ac
commit
b0e43c8097
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user