--- a/net/minecraft/server/commands/GameRuleCommand.java +++ b/net/minecraft/server/commands/GameRuleCommand.java @@ -31,9 +29,9 @@ commanddispatcher.register(literalargumentbuilder); } - static > int setRule(CommandContext commandcontext, GameRules.Key gamerules_key) { - CommandSourceStack commandsourcestack = (CommandSourceStack) commandcontext.getSource(); - T t0 = commandsourcestack.getServer().getGameRules().getRule(gamerules_key); + static > int setRule(CommandContext source, GameRules.Key gameRule) { + CommandSourceStack commandlistenerwrapper = (CommandSourceStack) source.getSource(); + T t0 = commandlistenerwrapper.getLevel().getGameRules().getRule(gameRule); // CraftBukkit t0.setFromArgument(commandcontext, "value"); commandsourcestack.sendSuccess(() -> { @@ -42,8 +40,8 @@ return t0.getCommandResult(); } - static > int queryRule(CommandSourceStack commandsourcestack, GameRules.Key gamerules_key) { - T t0 = commandsourcestack.getServer().getGameRules().getRule(gamerules_key); + static > int queryRule(CommandSourceStack source, GameRules.Key gameRule) { + T t0 = source.getLevel().getGameRules().getRule(gameRule); // CraftBukkit commandsourcestack.sendSuccess(() -> { return Component.translatable("commands.gamerule.query", gamerules_key.getId(), t0.toString());