diff --git a/paper-server/nms-patches/net/minecraft/server/commands/CommandTime.patch b/paper-server/nms-patches/net/minecraft/server/commands/CommandTime.patch index 442c59a244..d31fde373f 100644 --- a/paper-server/nms-patches/net/minecraft/server/commands/CommandTime.patch +++ b/paper-server/nms-patches/net/minecraft/server/commands/CommandTime.patch @@ -12,7 +12,13 @@ public class CommandTime { public CommandTime() {} -@@ -52,7 +57,13 @@ +@@ -47,12 +52,18 @@ + } + + public static int setTime(CommandListenerWrapper commandlistenerwrapper, int i) { +- Iterator iterator = commandlistenerwrapper.getServer().getAllLevels().iterator(); ++ Iterator iterator = com.google.common.collect.Iterators.singletonIterator(commandlistenerwrapper.getLevel()); // CraftBukkit - SPIGOT-6496: Only set the time for the world the command originates in + while (iterator.hasNext()) { WorldServer worldserver = (WorldServer) iterator.next(); @@ -27,7 +33,13 @@ } commandlistenerwrapper.sendSuccess(new ChatMessage("commands.time.set", new Object[]{i}), true); -@@ -65,7 +76,13 @@ +@@ -60,12 +71,18 @@ + } + + public static int addTime(CommandListenerWrapper commandlistenerwrapper, int i) { +- Iterator iterator = commandlistenerwrapper.getServer().getAllLevels().iterator(); ++ Iterator iterator = com.google.common.collect.Iterators.singletonIterator(commandlistenerwrapper.getLevel()); // CraftBukkit - SPIGOT-6496: Only set the time for the world the command originates in + while (iterator.hasNext()) { WorldServer worldserver = (WorldServer) iterator.next();