From 73eff0d75dfa8c6dca768d6c447ef532d9500590 Mon Sep 17 00:00:00 2001 From: Oliver Dunk Date: Sat, 5 Mar 2016 22:36:13 +1100 Subject: SPIGOT-1755: CommandBlock doesn't run on empty world --- nms-patches/CommandBlockListenerAbstract.patch | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'nms-patches/CommandBlockListenerAbstract.patch') diff --git a/nms-patches/CommandBlockListenerAbstract.patch b/nms-patches/CommandBlockListenerAbstract.patch index f5f63044..949cb489 100644 --- a/nms-patches/CommandBlockListenerAbstract.patch +++ b/nms-patches/CommandBlockListenerAbstract.patch @@ -33,7 +33,7 @@ } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Executing command block"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed"); -@@ -123,6 +133,130 @@ +@@ -123,6 +133,125 @@ } } @@ -58,11 +58,6 @@ + return 0; + } + -+ // If the world has no players don't run -+ if (sender.getWorld().players.isEmpty()) { -+ return 0; -+ } -+ + // Handle vanilla commands; + org.bukkit.command.Command commandBlockCommand = commandMap.getCommand(args[0]); + if (sender.getWorld().getServer().getCommandBlockOverride(args[0])) { -- cgit v1.2.3