mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 10:17:38 +01:00
43702a9e10
By: md_5 <git@md-5.net>
21 lines
1.4 KiB
Diff
21 lines
1.4 KiB
Diff
--- a/net/minecraft/server/commands/CommandGamerule.java
|
|
+++ b/net/minecraft/server/commands/CommandGamerule.java
|
|
@@ -31,7 +31,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(new ChatMessage("commands.gamerule.set", new Object[]{gamerules_gamerulekey.getId(), t0.toString()}), true);
|
|
@@ -39,7 +39,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(new ChatMessage("commands.gamerule.query", new Object[]{gamerules_gamerulekey.getId(), t0.toString()}), false);
|
|
return t0.getCommandResult();
|