aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/GameRuleCommand.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/GameRuleCommand.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/GameRuleCommand.java.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/GameRuleCommand.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/GameRuleCommand.java.patch
new file mode 100644
index 0000000000..f87d54ce97
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/commands/GameRuleCommand.java.patch
@@ -0,0 +1,26 @@
+--- a/net/minecraft/server/commands/GameRuleCommand.java
++++ b/net/minecraft/server/commands/GameRuleCommand.java
+@@ -31,9 +29,9 @@
+ commanddispatcher.register(literalargumentbuilder);
+ }
+
+- static <T extends GameRules.Value<T>> int setRule(CommandContext<CommandSourceStack> commandcontext, GameRules.Key<T> gamerules_key) {
+- CommandSourceStack commandsourcestack = (CommandSourceStack) commandcontext.getSource();
+- T t0 = commandsourcestack.getServer().getGameRules().getRule(gamerules_key);
++ static <T extends GameRules.Value<T>> int setRule(CommandContext<CommandSourceStack> source, GameRules.Key<T> 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 <T extends GameRules.Value<T>> int queryRule(CommandSourceStack commandsourcestack, GameRules.Key<T> gamerules_key) {
+- T t0 = commandsourcestack.getServer().getGameRules().getRule(gamerules_key);
++ static <T extends GameRules.Value<T>> int queryRule(CommandSourceStack source, GameRules.Key<T> gameRule) {
++ T t0 = source.getLevel().getGameRules().getRule(gameRule); // CraftBukkit
+
+ commandsourcestack.sendSuccess(() -> {
+ return Component.translatable("commands.gamerule.query", gamerules_key.getId(), t0.toString());