geforkt von Mirrors/Paper
999bd6c0ef
By: DerFrZocker <derrieple@gmail.com>
21 Zeilen
1.2 KiB
Diff
21 Zeilen
1.2 KiB
Diff
--- a/net/minecraft/server/commands/CommandSchedule.java
|
|
+++ b/net/minecraft/server/commands/CommandSchedule.java
|
|
@@ -57,7 +57,7 @@
|
|
} else {
|
|
long j = commandlistenerwrapper.getWorld().getTime() + (long) i;
|
|
MinecraftKey minecraftkey = (MinecraftKey) pair.getFirst();
|
|
- CustomFunctionCallbackTimerQueue<MinecraftServer> customfunctioncallbacktimerqueue = commandlistenerwrapper.getServer().getSaveData().H().u();
|
|
+ CustomFunctionCallbackTimerQueue<MinecraftServer> customfunctioncallbacktimerqueue = commandlistenerwrapper.getWorld().serverLevelData.H().u(); // CraftBukkit - SPIGOT-6667: Use world specific function timer
|
|
|
|
((Either) pair.getSecond()).ifLeft((customfunction) -> {
|
|
String s = minecraftkey.toString();
|
|
@@ -78,7 +78,7 @@
|
|
customfunctioncallbacktimerqueue.a(s, j, new CustomFunctionCallbackTag(minecraftkey));
|
|
commandlistenerwrapper.sendMessage(new ChatMessage("commands.schedule.created.tag", new Object[]{minecraftkey, i, j}), true);
|
|
});
|
|
- return Math.floorMod(j, Integer.MAX_VALUE);
|
|
+ return (int) Math.floorMod(j, (long) Integer.MAX_VALUE); // CraftBukkit - Downgrade to Java 8 method
|
|
}
|
|
}
|
|
|