--- a/net/minecraft/server/commands/CommandGamerule.java +++ b/net/minecraft/server/commands/CommandGamerule.java @@ -31,7 +31,7 @@ static > int setRule(CommandContext commandcontext, GameRules.GameRuleKey gamerules_gamerulekey) { CommandListenerWrapper commandlistenerwrapper = (CommandListenerWrapper) commandcontext.getSource(); - T t0 = commandlistenerwrapper.getServer().getGameRules().getRule(gamerules_gamerulekey); + T t0 = commandlistenerwrapper.getLevel().getGameRules().getRule(gamerules_gamerulekey); // CraftBukkit t0.setFromArgument(commandcontext, "value"); commandlistenerwrapper.sendSuccess(() -> { @@ -41,7 +41,7 @@ } static > int queryRule(CommandListenerWrapper commandlistenerwrapper, GameRules.GameRuleKey gamerules_gamerulekey) { - T t0 = commandlistenerwrapper.getServer().getGameRules().getRule(gamerules_gamerulekey); + T t0 = commandlistenerwrapper.getLevel().getGameRules().getRule(gamerules_gamerulekey); // CraftBukkit commandlistenerwrapper.sendSuccess(() -> { return IChatBaseComponent.translatable("commands.gamerule.query", gamerules_gamerulekey.getId(), t0.toString());