mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
275173e538
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 0c5d8709 SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends 255c4fdb SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot CraftBukkit Changes: b6b514b7e SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends fcff84de9 SPIGOT-7399: Revert null check in CraftMetaItem#safelyAdd 44a4b5649 SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot 676969d01 SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory
29 lines
1.8 KiB
Diff
29 lines
1.8 KiB
Diff
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/commands/ScheduleCommand.java b/src/main/java/net/minecraft/server/commands/ScheduleCommand.java
|
|
index e4b4cea196cc3274317cd93351ec50196d318ee9..20d1cf83438272ad774a805b4b3b87546485c787 100644
|
|
--- a/src/main/java/net/minecraft/server/commands/ScheduleCommand.java
|
|
+++ b/src/main/java/net/minecraft/server/commands/ScheduleCommand.java
|
|
@@ -31,7 +31,7 @@ public class ScheduleCommand {
|
|
return Component.translatable("commands.schedule.cleared.failure", object);
|
|
});
|
|
private static final SuggestionProvider<CommandSourceStack> SUGGEST_SCHEDULE = (commandcontext, suggestionsbuilder) -> {
|
|
- return SharedSuggestionProvider.suggest((Iterable) ((CommandSourceStack) commandcontext.getSource()).getServer().getWorldData().overworldData().getScheduledEvents().getEventsIds(), suggestionsbuilder);
|
|
+ return SharedSuggestionProvider.suggest((Iterable) ((net.minecraft.commands.CommandSourceStack) commandcontext.getSource()).getLevel().serverLevelData.getScheduledEvents().getEventsIds(), suggestionsbuilder); // Paper
|
|
};
|
|
|
|
public ScheduleCommand() {}
|
|
@@ -86,7 +86,7 @@ public class ScheduleCommand {
|
|
}
|
|
|
|
private static int remove(CommandSourceStack source, String eventName) throws CommandSyntaxException {
|
|
- int i = source.getServer().getWorldData().overworldData().getScheduledEvents().remove(eventName);
|
|
+ int i = source.getLevel().serverLevelData.getScheduledEvents().remove(eventName); // Paper
|
|
|
|
if (i == 0) {
|
|
throw ScheduleCommand.ERROR_CANT_REMOVE.create(eventName);
|