summaryrefslogtreecommitdiffstats
path: root/nms-patches/CommandGamerule.patch
blob: 30d67f7f896365c1b67bfdd4b7c84f501305013c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
 }