mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-16 18:31:53 +01:00
make schedule command per world
This commit is contained in:
parent
91e25d490a
commit
00664f31de
1 changed files with 37 additions and 0 deletions
37
Spigot-Server-Patches/Make-schedule-command-per-world.patch
Normal file
37
Spigot-Server-Patches/Make-schedule-command-per-world.patch
Normal file
|
@ -0,0 +1,37 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Mon, 4 Jan 2021 19:52:44 -0800
|
||||
Subject: [PATCH] Make schedule command per-world
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandSchedule.java b/src/main/java/net/minecraft/server/CommandSchedule.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandSchedule.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandSchedule.java
|
||||
@@ -0,0 +0,0 @@ public class CommandSchedule {
|
||||
return new ChatMessage("commands.schedule.cleared.failure", new Object[]{object});
|
||||
});
|
||||
private static final SuggestionProvider<CommandListenerWrapper> c = (commandcontext, suggestionsbuilder) -> {
|
||||
- return ICompletionProvider.b((Iterable) ((CommandListenerWrapper) commandcontext.getSource()).getServer().getSaveData().H().u().a(), suggestionsbuilder);
|
||||
+ return ICompletionProvider.b((Iterable) ((CommandListenerWrapper) commandcontext.getSource()).getWorld().worldDataServer.H().u().a(), suggestionsbuilder); // Paper
|
||||
};
|
||||
|
||||
public static void a(com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> com_mojang_brigadier_commanddispatcher) {
|
||||
@@ -0,0 +0,0 @@ public class CommandSchedule {
|
||||
} 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().worldDataServer.H().u(); // Paper
|
||||
|
||||
((Either) pair.getSecond()).ifLeft((customfunction) -> {
|
||||
String s = minecraftkey.toString();
|
||||
@@ -0,0 +0,0 @@ public class CommandSchedule {
|
||||
}
|
||||
|
||||
private static int a(CommandListenerWrapper commandlistenerwrapper, String s) throws CommandSyntaxException {
|
||||
- int i = commandlistenerwrapper.getServer().getSaveData().H().u().a(s);
|
||||
+ int i = commandlistenerwrapper.getWorld().worldDataServer.H().u().a(s); // Paper
|
||||
|
||||
if (i == 0) {
|
||||
throw CommandSchedule.b.create(s);
|
Loading…
Add table
Reference in a new issue