Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/CommandGamerule.patch

21 Zeilen
1.3 KiB
Diff

2018-08-03 13:03:21 +02:00
--- a/net/minecraft/server/CommandGamerule.java
+++ b/net/minecraft/server/CommandGamerule.java
2018-12-25 22:00:00 +01:00
@@ -27,7 +27,7 @@
2018-08-03 13:03:21 +02:00
}
private static int a(CommandListenerWrapper commandlistenerwrapper, String s, CommandContext<CommandListenerWrapper> commandcontext) {
2018-08-26 04:00:00 +02:00
- GameRules.GameRuleValue gamerules_gamerulevalue = commandlistenerwrapper.getServer().getGameRules().get(s);
2018-08-03 13:03:21 +02:00
+ GameRules.GameRuleValue gamerules_gamerulevalue = commandlistenerwrapper.getWorld().getGameRules().get(s); // CraftBukkit
2018-08-26 04:00:00 +02:00
gamerules_gamerulevalue.getType().a(commandcontext, "value", gamerules_gamerulevalue);
2019-04-23 04:00:00 +02:00
commandlistenerwrapper.sendMessage(new ChatMessage("commands.gamerule.set", new Object[] { s, gamerules_gamerulevalue.getValue()}), true);
2018-12-25 22:00:00 +01:00
@@ -35,7 +35,7 @@
2018-08-03 13:03:21 +02:00
}
private static int a(CommandListenerWrapper commandlistenerwrapper, String s) {
2018-08-26 04:00:00 +02:00
- GameRules.GameRuleValue gamerules_gamerulevalue = commandlistenerwrapper.getServer().getGameRules().get(s);
2018-08-03 13:03:21 +02:00
+ GameRules.GameRuleValue gamerules_gamerulevalue = commandlistenerwrapper.getWorld().getGameRules().get(s); // CraftBukkit
2019-04-23 04:00:00 +02:00
commandlistenerwrapper.sendMessage(new ChatMessage("commands.gamerule.query", new Object[] { s, gamerules_gamerulevalue.getValue()}), false);
return gamerules_gamerulevalue.getIntValue();