geforkt von Mirrors/Paper
Don't run command blocks in empty worlds. Fixes BUKKIT-3094
Dieser Commit ist enthalten in:
Ursprung
09684ba9d7
Commit
1af83da760
@ -25,7 +25,7 @@ public class TileEntityCommand extends TileEntity implements ICommandListener {
|
|||||||
MinecraftServer minecraftserver = MinecraftServer.getServer();
|
MinecraftServer minecraftserver = MinecraftServer.getServer();
|
||||||
|
|
||||||
if (minecraftserver != null && minecraftserver.getEnableCommandBlock()) {
|
if (minecraftserver != null && minecraftserver.getEnableCommandBlock()) {
|
||||||
// CraftBukkit start - handle command block as console TODO: add new CommandSender for this
|
// CraftBukkit start - handle command block as console
|
||||||
org.bukkit.command.SimpleCommandMap commandMap = minecraftserver.server.getCommandMap();
|
org.bukkit.command.SimpleCommandMap commandMap = minecraftserver.server.getCommandMap();
|
||||||
Joiner joiner = Joiner.on(" ");
|
Joiner joiner = Joiner.on(" ");
|
||||||
String command = this.a;
|
String command = this.a;
|
||||||
@ -47,6 +47,11 @@ public class TileEntityCommand extends TileEntity implements ICommandListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if the world has no players don't run
|
||||||
|
if (this.world.players.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
commands.add(args);
|
commands.add(args);
|
||||||
|
|
||||||
// find positions of command block syntax, if any
|
// find positions of command block syntax, if any
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren