2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/server/commands/CommandGamerule.java
|
|
|
|
+++ b/net/minecraft/server/commands/CommandGamerule.java
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -31,7 +31,7 @@
|
2018-08-03 13:03:21 +02:00
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
static <T extends GameRules.GameRuleValue<T>> int setRule(CommandContext<CommandListenerWrapper> commandcontext, GameRules.GameRuleKey<T> gamerules_gamerulekey) {
|
2019-06-21 12:00:00 +02:00
|
|
|
CommandListenerWrapper commandlistenerwrapper = (CommandListenerWrapper) commandcontext.getSource();
|
2021-11-21 23:00:00 +01:00
|
|
|
- T t0 = commandlistenerwrapper.getServer().getGameRules().getRule(gamerules_gamerulekey);
|
|
|
|
+ T t0 = commandlistenerwrapper.getLevel().getGameRules().getRule(gamerules_gamerulekey); // CraftBukkit
|
2018-08-03 13:03:21 +02:00
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
t0.setFromArgument(commandcontext, "value");
|
2023-06-07 17:30:00 +02:00
|
|
|
commandlistenerwrapper.sendSuccess(() -> {
|
|
|
|
@@ -41,7 +41,7 @@
|
2018-08-03 13:03:21 +02:00
|
|
|
}
|
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
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
|
2018-08-03 13:03:21 +02:00
|
|
|
|
2023-06-07 17:30:00 +02:00
|
|
|
commandlistenerwrapper.sendSuccess(() -> {
|
|
|
|
return IChatBaseComponent.translatable("commands.gamerule.query", gamerules_gamerulekey.getId(), t0.toString());
|