13
0
geforkt von Mirrors/Paper
Paper/paper-server/nms-patches/net/minecraft/server/commands/CommandGamerule.patch
CraftBukkit/Spigot d3a23f42c3 Update to Minecraft 1.21.2
By: md_5 <git@md-5.net>
2024-10-23 02:15:00 +11:00

21 Zeilen
1.3 KiB
Diff

--- a/net/minecraft/server/commands/CommandGamerule.java
+++ b/net/minecraft/server/commands/CommandGamerule.java
@@ -34,7 +34,7 @@
static <T extends GameRules.GameRuleValue<T>> int setRule(CommandContext<CommandListenerWrapper> commandcontext, GameRules.GameRuleKey<T> 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(() -> {
@@ -44,7 +44,7 @@
}
static <T extends GameRules.GameRuleValue<T>> int queryRule(CommandListenerWrapper commandlistenerwrapper, GameRules.GameRuleKey<T> 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());