Commits

Thinkofname authored 3433eeadc2a
Fix /gamerule always targeting the main world
No tags

nms-patches/CommandGamerule.patch

Added
1 +--- ../work/decompile-8eb82bde/net/minecraft/server/CommandGamerule.java 2014-12-10 16:21:38.404579167 +0000
2 ++++ src/main/java/net/minecraft/server/CommandGamerule.java 2014-12-10 16:18:45.268581046 +0000
3 +@@ -19,8 +19,8 @@
4 + return "commands.gamerule.usage";
5 + }
6 +
7 +- public void execute(ICommandListener icommandlistener, String[] astring) {
8 +- GameRules gamerules = this.d();
9 ++ public void execute(ICommandListener icommandlistener, String[] astring) throws CommandException { // CraftBukkit - added throws
10 ++ GameRules gamerules = icommandlistener.getWorld().getGameRules(); // Use current world
11 + String s = astring.length > 0 ? astring[0] : "";
12 + String s1 = astring.length > 1 ? a(astring, 1) : "";
13 +
14 +@@ -85,4 +85,11 @@
15 + private GameRules d() {
16 + return MinecraftServer.getServer().getWorldServer(0).getGameRules();
17 + }
18 ++
19 ++ // CraftBukkit start - fix decompile error
20 ++ @Override
21 ++ public int compareTo(Object o) {
22 ++ return a((ICommand) o);
23 ++ }
24 ++ // CraftBukkit end
25 + }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut