--- a/net/minecraft/server/commands/GameRuleCommand.java +++ b/net/minecraft/server/commands/GameRuleCommand.java @@ -34,7 +34,7 @@ static > int setRule(CommandContext context, GameRules.Key key) { CommandSourceStack commandlistenerwrapper = (CommandSourceStack) context.getSource(); - T t0 = commandlistenerwrapper.getServer().getGameRules().getRule(key); + T t0 = commandlistenerwrapper.getLevel().getGameRules().getRule(key); // CraftBukkit t0.setFromArgument(context, "value"); commandlistenerwrapper.sendSuccess(() -> { @@ -44,7 +44,7 @@ } static > int queryRule(CommandSourceStack source, GameRules.Key key) { - T t0 = source.getServer().getGameRules().getRule(key); + T t0 = source.getLevel().getGameRules().getRule(key); // CraftBukkit source.sendSuccess(() -> { return Component.translatable("commands.gamerule.query", key.getId(), t0.toString());