summaryrefslogtreecommitdiffstats
path: root/nms-patches/CommandGamerule.patch
blob: 055ff9554ba52e9c3a9c36aa29b86d3256ed7bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/net/minecraft/server/CommandGamerule.java
+++ b/net/minecraft/server/CommandGamerule.java
@@ -29,7 +29,7 @@
     }
 
     private static int a(CommandListenerWrapper commandlistenerwrapper, String s, CommandContext<CommandListenerWrapper> commandcontext) {
-        GameRules.GameRuleValue gamerules_gamerulevalue = commandlistenerwrapper.getServer().getGameRules().get(s);
+        GameRules.GameRuleValue gamerules_gamerulevalue = commandlistenerwrapper.getWorld().getGameRules().get(s); // CraftBukkit
 
         gamerules_gamerulevalue.getType().a(commandcontext, "value", gamerules_gamerulevalue);
         commandlistenerwrapper.sendMessage(new ChatMessage("commands.gamerule.set", new Object[] { s, gamerules_gamerulevalue.a()}), true);
@@ -37,7 +37,7 @@
     }
 
     private static int a(CommandListenerWrapper commandlistenerwrapper, String s) {
-        GameRules.GameRuleValue gamerules_gamerulevalue = commandlistenerwrapper.getServer().getGameRules().get(s);
+        GameRules.GameRuleValue gamerules_gamerulevalue = commandlistenerwrapper.getWorld().getGameRules().get(s); // CraftBukkit
 
         commandlistenerwrapper.sendMessage(new ChatMessage("commands.gamerule.query", new Object[] { s, gamerules_gamerulevalue.a()}), false);
         return gamerules_gamerulevalue.c();