From 3433eeadc2a408faacccd82b2db2f97c3c9f5dbd Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 10 Dec 2014 16:23:18 +0000 Subject: Fix /gamerule always targeting the main world --- nms-patches/CommandGamerule.patch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 nms-patches/CommandGamerule.patch (limited to 'nms-patches/CommandGamerule.patch') diff --git a/nms-patches/CommandGamerule.patch b/nms-patches/CommandGamerule.patch new file mode 100644 index 00000000..30d67f7f --- /dev/null +++ b/nms-patches/CommandGamerule.patch @@ -0,0 +1,25 @@ +--- ../work/decompile-8eb82bde/net/minecraft/server/CommandGamerule.java 2014-12-10 16:21:38.404579167 +0000 ++++ src/main/java/net/minecraft/server/CommandGamerule.java 2014-12-10 16:18:45.268581046 +0000 +@@ -19,8 +19,8 @@ + return "commands.gamerule.usage"; + } + +- public void execute(ICommandListener icommandlistener, String[] astring) { +- GameRules gamerules = this.d(); ++ public void execute(ICommandListener icommandlistener, String[] astring) throws CommandException { // CraftBukkit - added throws ++ GameRules gamerules = icommandlistener.getWorld().getGameRules(); // Use current world + String s = astring.length > 0 ? astring[0] : ""; + String s1 = astring.length > 1 ? a(astring, 1) : ""; + +@@ -85,4 +85,11 @@ + private GameRules d() { + return MinecraftServer.getServer().getWorldServer(0).getGameRules(); + } ++ ++ // CraftBukkit start - fix decompile error ++ @Override ++ public int compareTo(Object o) { ++ return a((ICommand) o); ++ } ++ // CraftBukkit end + } -- cgit v1.2.3