summaryrefslogtreecommitdiffstats
path: root/nms-patches/CommandGamerule.patch
blob: 9dceb5c901bceeef9c584981d8d260eb8cebecc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- a/net/minecraft/server/CommandGamerule.java
+++ b/net/minecraft/server/CommandGamerule.java
@@ -22,7 +22,7 @@
     }
 
     public void execute(MinecraftServer minecraftserver, ICommandListener icommandlistener, String[] astring) throws CommandException {
-        GameRules gamerules = this.a(minecraftserver);
+        GameRules gamerules = icommandlistener.getWorld().getGameRules(); // CraftBukkit - Use current world
         String s = astring.length > 0 ? astring[0] : "";
         String s1 = astring.length > 1 ? a(astring, 1) : "";
 
@@ -87,4 +87,11 @@
     private GameRules a(MinecraftServer minecraftserver) {
         return minecraftserver.getWorldServer(0).getGameRules();
     }
+
+    // CraftBukkit start - fix decompile error
+    @Override
+    public int compareTo(ICommand o) {
+        return a((ICommand) o);
+    }
+    // CraftBukkit end
 }