SPIGOT-1755: CommandBlock doesn't run on empty world
By: Oliver Dunk <oliver@oliverdunk.com>
This commit is contained in:
parent
db997edc76
commit
2af4470275
1 changed files with 1 additions and 6 deletions
|
@ -33,7 +33,7 @@
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.a(throwable, "Executing command block");
|
CrashReport crashreport = CrashReport.a(throwable, "Executing command block");
|
||||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");
|
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");
|
||||||
@@ -123,6 +133,130 @@
|
@@ -123,6 +133,125 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,11 +58,6 @@
|
||||||
+ return 0;
|
+ return 0;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ // If the world has no players don't run
|
|
||||||
+ if (sender.getWorld().players.isEmpty()) {
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // Handle vanilla commands;
|
+ // Handle vanilla commands;
|
||||||
+ org.bukkit.command.Command commandBlockCommand = commandMap.getCommand(args[0]);
|
+ org.bukkit.command.Command commandBlockCommand = commandMap.getCommand(args[0]);
|
||||||
+ if (sender.getWorld().getServer().getCommandBlockOverride(args[0])) {
|
+ if (sender.getWorld().getServer().getCommandBlockOverride(args[0])) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue