From 55b3a09dde116a04d51f7176c337c5d34b4610b7 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 1 Feb 2020 15:20:54 +0000 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) Upstream has released updates that appears 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: d0800d0c Update checkstyle e4e4bf70 Remove package-info from tests, breaks some IDEs d6651bb0 No longer necessary to synchronize sync events CraftBukkit Changes: e82b5477 SPIGOT-5556: Some biome methods use incorrect positions 544ccdc5 Update checkstyle 512ff7a5 Print legacy load reason in debug mode df371c1b SPIGOT-5554: Clear error message when BossBar is used for not fully joined players 18168500 Update scriptus 6bbb4e73 Clean up CraftBlockData.toString b1e96bd5 SPIGOT-5551: BlockState.setData fails when used by legacy plugin Spigot Changes: b9baf717 Add space before ocean seed output 13394884 Rebuild patches --- Spigot-API-Patches/0004-Timings-v2.patch | 78 +++++++++---------- .../0017-Add-exception-reporting-event.patch | 28 +++---- ...eload-permissions.yml-and-require-co.patch | 12 +-- ...deadlock-risk-in-firing-async-events.patch | 18 ++--- Spigot-Server-Patches/0001-POM-Changes.patch | 8 +- Spigot-Server-Patches/0009-Timings-v2.patch | 6 +- .../0018-Implement-Paper-VersionChecker.patch | 6 +- ...ftMagicNumbers.isSupportedApiVersion.patch | 6 +- .../0432-Init-legacy-material-data.patch | 40 ---------- ...h => 0432-Seed-based-feature-search.patch} | 2 +- ...et-gravity-in-void.-Fixes-MC-167279.patch} | 2 +- ...-getChunkAt-calls-for-loaded-chunks.patch} | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 15 files changed, 86 insertions(+), 128 deletions(-) delete mode 100644 Spigot-Server-Patches/0432-Init-legacy-material-data.patch rename Spigot-Server-Patches/{0433-Seed-based-feature-search.patch => 0432-Seed-based-feature-search.patch} (98%) rename Spigot-Server-Patches/{0434-Bees-get-gravity-in-void.-Fixes-MC-167279.patch => 0433-Bees-get-gravity-in-void.-Fixes-MC-167279.patch} (97%) rename Spigot-Server-Patches/{0435-Optimise-getChunkAt-calls-for-loaded-chunks.patch => 0434-Optimise-getChunkAt-calls-for-loaded-chunks.patch} (98%) diff --git a/Spigot-API-Patches/0004-Timings-v2.patch b/Spigot-API-Patches/0004-Timings-v2.patch index fba527b2bd..cfc220c5ad 100644 --- a/Spigot-API-Patches/0004-Timings-v2.patch +++ b/Spigot-API-Patches/0004-Timings-v2.patch @@ -1,4 +1,4 @@ -From 060742f1c76bdb9323a7208250965788502ad043 Mon Sep 17 00:00:00 2001 +From 6fbd2dbbb48a9fd96971d79992af9b9f1e5487dd Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 29 Feb 2016 18:48:17 -0600 Subject: [PATCH] Timings v2 @@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2 diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java new file mode 100644 -index 00000000..64531fcc +index 000000000..64531fcce --- /dev/null +++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java @@ -0,0 +1,84 @@ @@ -96,7 +96,7 @@ index 00000000..64531fcc +} diff --git a/src/main/java/co/aikar/timings/NullTimingHandler.java b/src/main/java/co/aikar/timings/NullTimingHandler.java new file mode 100644 -index 00000000..9b45ce88 +index 000000000..9b45ce887 --- /dev/null +++ b/src/main/java/co/aikar/timings/NullTimingHandler.java @@ -0,0 +1,68 @@ @@ -170,7 +170,7 @@ index 00000000..9b45ce88 +} diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java new file mode 100644 -index 00000000..933ecf9b +index 000000000..933ecf9bd --- /dev/null +++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java @@ -0,0 +1,83 @@ @@ -259,7 +259,7 @@ index 00000000..933ecf9b +} diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java new file mode 100644 -index 00000000..a21e5ead +index 000000000..a21e5ead5 --- /dev/null +++ b/src/main/java/co/aikar/timings/Timing.java @@ -0,0 +1,83 @@ @@ -348,7 +348,7 @@ index 00000000..a21e5ead +} diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java new file mode 100644 -index 00000000..a5d13a1e +index 000000000..a5d13a1e4 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingData.java @@ -0,0 +1,122 @@ @@ -476,7 +476,7 @@ index 00000000..a5d13a1e +} diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java new file mode 100644 -index 00000000..cc0390c0 +index 000000000..cc0390c06 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHandler.java @@ -0,0 +1,227 @@ @@ -709,7 +709,7 @@ index 00000000..cc0390c0 +} diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java new file mode 100644 -index 00000000..ddaed812 +index 000000000..ddaed8127 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHistory.java @@ -0,0 +1,354 @@ @@ -1069,7 +1069,7 @@ index 00000000..ddaed812 +} diff --git a/src/main/java/co/aikar/timings/TimingHistoryEntry.java b/src/main/java/co/aikar/timings/TimingHistoryEntry.java new file mode 100644 -index 00000000..86d5ac6b +index 000000000..86d5ac6bd --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingHistoryEntry.java @@ -0,0 +1,58 @@ @@ -1133,7 +1133,7 @@ index 00000000..86d5ac6b +} diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java new file mode 100644 -index 00000000..df142a89 +index 000000000..df142a89b --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingIdentifier.java @@ -0,0 +1,116 @@ @@ -1255,7 +1255,7 @@ index 00000000..df142a89 +} diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java new file mode 100644 -index 00000000..0b34e0d0 +index 000000000..0b34e0d01 --- /dev/null +++ b/src/main/java/co/aikar/timings/Timings.java @@ -0,0 +1,293 @@ @@ -1554,7 +1554,7 @@ index 00000000..0b34e0d0 +} diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java new file mode 100644 -index 00000000..c0d8f201 +index 000000000..c0d8f2016 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsCommand.java @@ -0,0 +1,122 @@ @@ -1682,7 +1682,7 @@ index 00000000..c0d8f201 +} diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java new file mode 100644 -index 00000000..23eb8c65 +index 000000000..23eb8c65c --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsExport.java @@ -0,0 +1,355 @@ @@ -2043,7 +2043,7 @@ index 00000000..23eb8c65 +} diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java new file mode 100644 -index 00000000..ef824d70 +index 000000000..ef824d701 --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsManager.java @@ -0,0 +1,188 @@ @@ -2237,7 +2237,7 @@ index 00000000..ef824d70 +} diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java new file mode 100644 -index 00000000..bf3e059f +index 000000000..bf3e059fe --- /dev/null +++ b/src/main/java/co/aikar/timings/TimingsReportListener.java @@ -0,0 +1,75 @@ @@ -2318,7 +2318,7 @@ index 00000000..bf3e059f +} diff --git a/src/main/java/co/aikar/timings/UnsafeTimingHandler.java b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java new file mode 100644 -index 00000000..632c4961 +index 000000000..632c49615 --- /dev/null +++ b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java @@ -0,0 +1,53 @@ @@ -2377,7 +2377,7 @@ index 00000000..632c4961 +} diff --git a/src/main/java/co/aikar/util/Counter.java b/src/main/java/co/aikar/util/Counter.java new file mode 100644 -index 00000000..80155072 +index 000000000..80155072d --- /dev/null +++ b/src/main/java/co/aikar/util/Counter.java @@ -0,0 +1,38 @@ @@ -2421,7 +2421,7 @@ index 00000000..80155072 +} diff --git a/src/main/java/co/aikar/util/JSONUtil.java b/src/main/java/co/aikar/util/JSONUtil.java new file mode 100644 -index 00000000..190bf059 +index 000000000..190bf0598 --- /dev/null +++ b/src/main/java/co/aikar/util/JSONUtil.java @@ -0,0 +1,140 @@ @@ -2567,7 +2567,7 @@ index 00000000..190bf059 +} diff --git a/src/main/java/co/aikar/util/LoadingIntMap.java b/src/main/java/co/aikar/util/LoadingIntMap.java new file mode 100644 -index 00000000..63a899c7 +index 000000000..63a899c7d --- /dev/null +++ b/src/main/java/co/aikar/util/LoadingIntMap.java @@ -0,0 +1,76 @@ @@ -2649,7 +2649,7 @@ index 00000000..63a899c7 +} diff --git a/src/main/java/co/aikar/util/LoadingMap.java b/src/main/java/co/aikar/util/LoadingMap.java new file mode 100644 -index 00000000..aedbb033 +index 000000000..aedbb0332 --- /dev/null +++ b/src/main/java/co/aikar/util/LoadingMap.java @@ -0,0 +1,368 @@ @@ -3023,7 +3023,7 @@ index 00000000..aedbb033 +} diff --git a/src/main/java/co/aikar/util/MRUMapCache.java b/src/main/java/co/aikar/util/MRUMapCache.java new file mode 100644 -index 00000000..5989ee21 +index 000000000..5989ee212 --- /dev/null +++ b/src/main/java/co/aikar/util/MRUMapCache.java @@ -0,0 +1,111 @@ @@ -3139,7 +3139,7 @@ index 00000000..5989ee21 + } +} diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index bbc68de0..a85b8b86 100644 +index bbc68de0a..a85b8b860 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -574,7 +574,6 @@ public final class Bukkit { @@ -3151,7 +3151,7 @@ index bbc68de0..a85b8b86 100644 /** diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 042db4f5..f4f0f3da 100644 +index 042db4f53..f4f0f3da2 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1248,6 +1248,26 @@ public interface Server extends PluginMessageRecipient { @@ -3182,7 +3182,7 @@ index 042db4f5..f4f0f3da 100644 * Sends the component to the player * diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 247d194f..72c5501e 100644 +index 247d194f8..72c5501e8 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -69,4 +69,12 @@ public interface UnsafeValues { @@ -3200,7 +3200,7 @@ index 247d194f..72c5501e 100644 } diff --git a/src/main/java/org/bukkit/command/BufferedCommandSender.java b/src/main/java/org/bukkit/command/BufferedCommandSender.java new file mode 100644 -index 00000000..f9a00aec +index 000000000..f9a00aecc --- /dev/null +++ b/src/main/java/org/bukkit/command/BufferedCommandSender.java @@ -0,0 +1,21 @@ @@ -3226,7 +3226,7 @@ index 00000000..f9a00aec + } +} diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java -index 4bfc2146..03bdc162 100644 +index 4bfc21468..03bdc1622 100644 --- a/src/main/java/org/bukkit/command/Command.java +++ b/src/main/java/org/bukkit/command/Command.java @@ -33,7 +33,8 @@ public abstract class Command { @@ -3256,7 +3256,7 @@ index 4bfc2146..03bdc162 100644 return true; } diff --git a/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/src/main/java/org/bukkit/command/FormattedCommandAlias.java -index d6c8938b..a6ad94ef 100644 +index d6c8938b1..a6ad94ef9 100644 --- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java +++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java @@ -9,6 +9,7 @@ public class FormattedCommandAlias extends Command { @@ -3280,7 +3280,7 @@ index d6c8938b..a6ad94ef 100644 } diff --git a/src/main/java/org/bukkit/command/MessageCommandSender.java b/src/main/java/org/bukkit/command/MessageCommandSender.java new file mode 100644 -index 00000000..ca1893e9 +index 000000000..ca1893e9f --- /dev/null +++ b/src/main/java/org/bukkit/command/MessageCommandSender.java @@ -0,0 +1,114 @@ @@ -3399,7 +3399,7 @@ index 00000000..ca1893e9 + +} diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index 81e4fa57..f020cb04 100644 +index 81e4fa573..f020cb04e 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java @@ -15,7 +15,6 @@ import org.bukkit.command.defaults.BukkitCommand; @@ -3456,7 +3456,7 @@ index 81e4fa57..f020cb04 100644 diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java deleted file mode 100644 -index 2a145d85..00000000 +index 2a145d851..000000000 --- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java +++ /dev/null @@ -1,250 +0,0 @@ @@ -3711,7 +3711,7 @@ index 2a145d85..00000000 - // Spigot end -} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index 9b0153f7..9d82a691 100644 +index 9b0153f7d..9d82a691a 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -1573,6 +1573,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -3727,7 +3727,7 @@ index 9b0153f7..9d82a691 100644 @NotNull diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index c4ef983e..3c5d8a0e 100644 +index 180794eb4..b9ce12ff9 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -313,7 +313,6 @@ public final class SimplePluginManager implements PluginManager { @@ -3756,7 +3756,7 @@ index c4ef983e..3c5d8a0e 100644 } @Override -@@ -602,7 +601,8 @@ public final class SimplePluginManager implements PluginManager { +@@ -598,7 +597,8 @@ public final class SimplePluginManager implements PluginManager { throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled"); } @@ -3766,7 +3766,7 @@ index c4ef983e..3c5d8a0e 100644 getEventListeners(event).register(new TimedRegisteredListener(listener, executor, priority, plugin, ignoreCancelled)); } else { getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled)); -@@ -806,7 +806,7 @@ public final class SimplePluginManager implements PluginManager { +@@ -802,7 +802,7 @@ public final class SimplePluginManager implements PluginManager { @Override public boolean useTimings() { @@ -3775,7 +3775,7 @@ index c4ef983e..3c5d8a0e 100644 } /** -@@ -815,6 +815,6 @@ public final class SimplePluginManager implements PluginManager { +@@ -811,6 +811,6 @@ public final class SimplePluginManager implements PluginManager { * @param use True if per event timing code should be used */ public void useTimings(boolean use) { @@ -3784,7 +3784,7 @@ index c4ef983e..3c5d8a0e 100644 } } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index df8a5dcb..50a51394 100644 +index df8a5dcbe..50a51394f 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -53,7 +53,6 @@ public final class JavaPluginLoader implements PluginLoader { @@ -3827,7 +3827,7 @@ index df8a5dcb..50a51394 100644 eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled())); } else { diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -index 5830e8b9..36f542a8 100644 +index 5830e8b9b..36f542a85 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -28,7 +28,8 @@ import org.jetbrains.annotations.Nullable; @@ -3841,7 +3841,7 @@ index 5830e8b9..36f542a8 100644 private final Map> classes = new ConcurrentHashMap>(); private final PluginDescriptionFile description; diff --git a/src/main/java/org/bukkit/util/CachedServerIcon.java b/src/main/java/org/bukkit/util/CachedServerIcon.java -index 5ca863b3..612958a3 100644 +index 5ca863b36..612958a33 100644 --- a/src/main/java/org/bukkit/util/CachedServerIcon.java +++ b/src/main/java/org/bukkit/util/CachedServerIcon.java @@ -2,6 +2,7 @@ package org.bukkit.util; @@ -3864,7 +3864,7 @@ index 5ca863b3..612958a3 100644 + +} diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java -index 44badfed..3cbe5c2b 100644 +index 44badfedc..3cbe5c2bb 100644 --- a/src/main/java/org/spigotmc/CustomTimingsHandler.java +++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java @@ -1,3 +1,26 @@ diff --git a/Spigot-API-Patches/0017-Add-exception-reporting-event.patch b/Spigot-API-Patches/0017-Add-exception-reporting-event.patch index 0e2f905a8b..dc5bc28685 100644 --- a/Spigot-API-Patches/0017-Add-exception-reporting-event.patch +++ b/Spigot-API-Patches/0017-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From f29af31242cefc4315ca2a927877402fdb573e7b Mon Sep 17 00:00:00 2001 +From 7a83523a3eebae620b149e5ef57205a59c5acd97 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 20:24:35 -0600 Subject: [PATCH] Add exception reporting event @@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event diff --git a/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java b/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java new file mode 100644 -index 00000000..2f573299 +index 000000000..2f573299a --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/server/ServerExceptionEvent.java @@ -0,0 +1,43 @@ @@ -55,7 +55,7 @@ index 00000000..2f573299 +} diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerCommandException.java b/src/main/java/com/destroystokyo/paper/exception/ServerCommandException.java new file mode 100644 -index 00000000..6fb39af0 +index 000000000..6fb39af04 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/exception/ServerCommandException.java @@ -0,0 +1,64 @@ @@ -125,7 +125,7 @@ index 00000000..6fb39af0 +} diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerEventException.java b/src/main/java/com/destroystokyo/paper/exception/ServerEventException.java new file mode 100644 -index 00000000..410b2413 +index 000000000..410b24139 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/exception/ServerEventException.java @@ -0,0 +1,52 @@ @@ -183,7 +183,7 @@ index 00000000..410b2413 +} diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerException.java b/src/main/java/com/destroystokyo/paper/exception/ServerException.java new file mode 100644 -index 00000000..c06ea394 +index 000000000..c06ea3942 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/exception/ServerException.java @@ -0,0 +1,23 @@ @@ -212,7 +212,7 @@ index 00000000..c06ea394 +} diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerInternalException.java b/src/main/java/com/destroystokyo/paper/exception/ServerInternalException.java new file mode 100644 -index 00000000..e762ed0d +index 000000000..e762ed0db --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/exception/ServerInternalException.java @@ -0,0 +1,35 @@ @@ -253,7 +253,7 @@ index 00000000..e762ed0d +} diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerPluginEnableDisableException.java b/src/main/java/com/destroystokyo/paper/exception/ServerPluginEnableDisableException.java new file mode 100644 -index 00000000..f016ba3b +index 000000000..f016ba3b1 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/exception/ServerPluginEnableDisableException.java @@ -0,0 +1,20 @@ @@ -280,7 +280,7 @@ index 00000000..f016ba3b \ No newline at end of file diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerPluginException.java b/src/main/java/com/destroystokyo/paper/exception/ServerPluginException.java new file mode 100644 -index 00000000..6defac28 +index 000000000..6defac287 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/exception/ServerPluginException.java @@ -0,0 +1,38 @@ @@ -324,7 +324,7 @@ index 00000000..6defac28 +} diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java b/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java new file mode 100644 -index 00000000..89e13252 +index 000000000..89e132525 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/exception/ServerPluginMessageException.java @@ -0,0 +1,64 @@ @@ -394,7 +394,7 @@ index 00000000..89e13252 +} diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerSchedulerException.java b/src/main/java/com/destroystokyo/paper/exception/ServerSchedulerException.java new file mode 100644 -index 00000000..2d0b2d4a +index 000000000..2d0b2d4a9 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/exception/ServerSchedulerException.java @@ -0,0 +1,37 @@ @@ -437,7 +437,7 @@ index 00000000..2d0b2d4a +} diff --git a/src/main/java/com/destroystokyo/paper/exception/ServerTabCompleteException.java b/src/main/java/com/destroystokyo/paper/exception/ServerTabCompleteException.java new file mode 100644 -index 00000000..5582999f +index 000000000..5582999fe --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/exception/ServerTabCompleteException.java @@ -0,0 +1,22 @@ @@ -464,7 +464,7 @@ index 00000000..5582999f + } +} diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java -index f020cb04..adfc7aae 100644 +index f020cb04e..adfc7aae2 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java @@ -8,6 +8,10 @@ import java.util.HashMap; @@ -506,7 +506,7 @@ index f020cb04..adfc7aae 100644 } diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 3c5d8a0e..861d808c 100644 +index b9ce12ff9..715954c75 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -23,6 +23,10 @@ import java.util.WeakHashMap; @@ -587,7 +587,7 @@ index 3c5d8a0e..861d808c 100644 @Override public void clearPlugins() { synchronized (this) { -@@ -556,7 +573,13 @@ public final class SimplePluginManager implements PluginManager { +@@ -552,7 +569,13 @@ public final class SimplePluginManager implements PluginManager { )); } } catch (Throwable ex) { diff --git a/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch b/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch index 7f1e3496c1..4a69ed4e4c 100644 --- a/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch +++ b/Spigot-API-Patches/0025-Add-command-to-reload-permissions.yml-and-require-co.patch @@ -1,4 +1,4 @@ -From b3b57a6566f5e8177cbbb4ee15fd5898a05feb42 Mon Sep 17 00:00:00 2001 +From a11adba8d108fa72b7cebd2e84f0cceff1098f7c Mon Sep 17 00:00:00 2001 From: William Date: Fri, 18 Mar 2016 03:28:07 -0400 Subject: [PATCH] Add command to reload permissions.yml and require confirm to @@ -6,7 +6,7 @@ Subject: [PATCH] Add command to reload permissions.yml and require confirm to diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index f152a60f..58a183b9 100644 +index f152a60f6..58a183b9d 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -1516,6 +1516,13 @@ public final class Bukkit { @@ -24,7 +24,7 @@ index f152a60f..58a183b9 100644 @NotNull diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 74f9d2bb..ca0b63fa 100644 +index 74f9d2bbc..ca0b63fa0 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1336,4 +1336,6 @@ public interface Server extends PluginMessageRecipient { @@ -35,7 +35,7 @@ index 74f9d2bb..ca0b63fa 100644 + void reloadPermissions(); // Paper } diff --git a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java -index 50cc311b..c62da413 100644 +index 50cc311be..c62da4131 100644 --- a/src/main/java/org/bukkit/command/defaults/ReloadCommand.java +++ b/src/main/java/org/bukkit/command/defaults/ReloadCommand.java @@ -13,15 +13,35 @@ public class ReloadCommand extends BukkitCommand { @@ -85,10 +85,10 @@ index 50cc311b..c62da413 100644 } } diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 861d808c..1c355a75 100644 +index 715954c75..f70296d76 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -@@ -840,4 +840,13 @@ public final class SimplePluginManager implements PluginManager { +@@ -836,4 +836,13 @@ public final class SimplePluginManager implements PluginManager { public void useTimings(boolean use) { co.aikar.timings.Timings.setTimingsEnabled(use); // Paper } diff --git a/Spigot-API-Patches/0129-Remove-deadlock-risk-in-firing-async-events.patch b/Spigot-API-Patches/0129-Remove-deadlock-risk-in-firing-async-events.patch index 97515d462e..e1c50b208d 100644 --- a/Spigot-API-Patches/0129-Remove-deadlock-risk-in-firing-async-events.patch +++ b/Spigot-API-Patches/0129-Remove-deadlock-risk-in-firing-async-events.patch @@ -1,4 +1,4 @@ -From e7fbc30984f676f22c203d4a1eff91ae30f9e9dc Mon Sep 17 00:00:00 2001 +From 163117188ccb4f53aa7ca1e7f9bd8f771c765a88 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 9 Sep 2018 00:32:05 -0400 Subject: [PATCH] Remove deadlock risk in firing async events @@ -16,7 +16,7 @@ which results in a hard crash. This change removes the synchronize and adds some protection around enable/disable diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index a8dbf282..b4069dbf 100644 +index a8dbf282d..b4069dbf3 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -28,7 +28,7 @@ import org.jetbrains.annotations.Nullable; @@ -29,7 +29,7 @@ index a8dbf282..b4069dbf 100644 * * @return a new copy of Location containing the position of this entity diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 7453230c..634e51d5 100644 +index 93a8cc13b..8d54d5619 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -414,7 +414,7 @@ public final class SimplePluginManager implements PluginManager { @@ -67,7 +67,7 @@ index 7453230c..634e51d5 100644 /** * Calls an event with the given details. -@@ -541,25 +542,13 @@ public final class SimplePluginManager implements PluginManager { +@@ -539,23 +540,13 @@ public final class SimplePluginManager implements PluginManager { */ @Override public void callEvent(@NotNull Event event) { @@ -78,28 +78,26 @@ index 7453230c..634e51d5 100644 - if (server.isPrimaryThread()) { - throw new IllegalStateException(event.getEventName() + " cannot be triggered asynchronously from primary server thread."); - } -- fireEvent(event); - } else { - if (!server.isPrimaryThread()) { - throw new IllegalStateException(event.getEventName() + " cannot be triggered asynchronously from another thread."); - } -- synchronized (this) { -- fireEvent(event); -- } + // Paper - replace callEvent by merging to below method + if (event.isAsynchronous() && server.isPrimaryThread()) { + throw new IllegalStateException(event.getEventName() + " may only be triggered asynchronously."); + } else if (!event.isAsynchronous() && !server.isPrimaryThread()) { + throw new IllegalStateException(event.getEventName() + " may only be triggered synchronously."); } -- } +- fireEvent(event); +- } +- - private void fireEvent(@NotNull Event event) { HandlerList handlers = event.getHandlers(); RegisteredListener[] listeners = handlers.getRegisteredListeners(); diff --git a/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/src/test/java/org/bukkit/plugin/PluginManagerTest.java -index f188cd4f..1941c9f4 100644 +index f188cd4f3..1941c9f49 100644 --- a/src/test/java/org/bukkit/plugin/PluginManagerTest.java +++ b/src/test/java/org/bukkit/plugin/PluginManagerTest.java @@ -17,7 +17,7 @@ public class PluginManagerTest { diff --git a/Spigot-Server-Patches/0001-POM-Changes.patch b/Spigot-Server-Patches/0001-POM-Changes.patch index 5a2a16bf66..fdce9a3f35 100644 --- a/Spigot-Server-Patches/0001-POM-Changes.patch +++ b/Spigot-Server-Patches/0001-POM-Changes.patch @@ -1,11 +1,11 @@ -From f4eb8e7892445a413b8c70f54fd16397a8aa402e Mon Sep 17 00:00:00 2001 +From 32ee60c7eaad2eb1fa2b83ba68b3268ac3de955b Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 29 Feb 2016 20:40:33 -0600 Subject: [PATCH] POM Changes diff --git a/pom.xml b/pom.xml -index 522b89751..ee7d3d521 100644 +index def28b3be..3dc6c2a3f 100644 --- a/pom.xml +++ b/pom.xml @@ -1,15 +1,14 @@ @@ -59,7 +59,7 @@ index 522b89751..ee7d3d521 100644 - net.md-5 - scriptus -- 0.2 +- 0.3.2 + com.lukegb.mojo + gitdescribe-maven-plugin + 1.3 @@ -159,5 +159,5 @@ index 93046379d..674096cab 100644 if (stream != null) { -- -2.25.0.windows.1 +2.25.0 diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 9dc779917b..b0a7ea5485 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From a4a6f03e666aa2f01f7dee3aad76884da38fe00b Mon Sep 17 00:00:00 2001 +From 9ab11077cbfaab8088f7a407153b156636f5a9b9 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -1769,10 +1769,10 @@ index e52ef47b7..3d90b3426 100644 this.value = value; } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index afe4004ff..1c719ec0e 100644 +index 68728b4d8..02f330053 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -290,6 +290,13 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -298,6 +298,13 @@ public final class CraftMagicNumbers implements UnsafeValues { return clazz; } diff --git a/Spigot-Server-Patches/0018-Implement-Paper-VersionChecker.patch b/Spigot-Server-Patches/0018-Implement-Paper-VersionChecker.patch index 5dbb258be0..0604914a4b 100644 --- a/Spigot-Server-Patches/0018-Implement-Paper-VersionChecker.patch +++ b/Spigot-Server-Patches/0018-Implement-Paper-VersionChecker.patch @@ -1,4 +1,4 @@ -From 2f074ced2abd0a06240e695b6d734e9a607be80b Mon Sep 17 00:00:00 2001 +From 60efe5ffc66ebc870d9090bdf9c0cf51e0545a37 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Mon, 27 May 2019 03:40:05 -0500 Subject: [PATCH] Implement Paper VersionChecker @@ -126,10 +126,10 @@ index 000000000..5deed3e25 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 1c719ec0e..919892106 100644 +index 02f330053..b1e1b59d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -295,6 +295,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -303,6 +303,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public String getTimingsServerName() { return com.destroystokyo.paper.PaperConfig.timingsServerName; } diff --git a/Spigot-Server-Patches/0414-Add-CraftMagicNumbers.isSupportedApiVersion.patch b/Spigot-Server-Patches/0414-Add-CraftMagicNumbers.isSupportedApiVersion.patch index b660d6d776..f94bebca3e 100644 --- a/Spigot-Server-Patches/0414-Add-CraftMagicNumbers.isSupportedApiVersion.patch +++ b/Spigot-Server-Patches/0414-Add-CraftMagicNumbers.isSupportedApiVersion.patch @@ -1,14 +1,14 @@ -From 6c69133e1ead914f0314c1fff50bba565d3cc1b6 Mon Sep 17 00:00:00 2001 +From 32b8a8aae60c0ee6e0e1fba24756de333d726dc8 Mon Sep 17 00:00:00 2001 From: BlackHole Date: Sun, 15 Dec 2019 19:12:39 +0100 Subject: [PATCH] Add CraftMagicNumbers.isSupportedApiVersion() diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 919892106..6a6e4fe48 100644 +index b1e1b59d4..770375ed4 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -300,6 +300,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -308,6 +308,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() { return new com.destroystokyo.paper.PaperVersionFetcher(); } diff --git a/Spigot-Server-Patches/0432-Init-legacy-material-data.patch b/Spigot-Server-Patches/0432-Init-legacy-material-data.patch deleted file mode 100644 index 23f15f07aa..0000000000 --- a/Spigot-Server-Patches/0432-Init-legacy-material-data.patch +++ /dev/null @@ -1,40 +0,0 @@ -From e84c8fcfe99150c99a5d0fbb8ba2dde725ee1b81 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -Date: Thu, 23 Jan 2020 21:30:07 +0000 -Subject: [PATCH] Init legacy material data - -This fixes an issue with plugins using legacy materials, spigot does -not populate the bukkit registry properly, leading to NPEs when using -outdated plugins. This patch should likely be dropped when spigot fixes -their legacy data usage.... - -diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 6a6e4fe48..8d93ad6b4 100644 ---- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -91,10 +91,6 @@ public final class CraftMagicNumbers implements UnsafeValues { - } - - for (Material material : Material.values()) { -- if (material.isLegacy()) { -- continue; -- } -- - MinecraftKey key = key(material); - IRegistry.ITEM.getOptional(key).ifPresent((item) -> { - MATERIAL_ITEM.put(material, item); -@@ -122,6 +118,11 @@ public final class CraftMagicNumbers implements UnsafeValues { - } - - public static MinecraftKey key(Material mat) { -+ // Paper start -+ if (mat.isLegacy()) { -+ mat = CraftLegacy.fromLegacy(mat); -+ } -+ // Paper end - return CraftNamespacedKey.toMinecraft(mat.getKey()); - } - // ======================================================================== --- -2.25.0 - diff --git a/Spigot-Server-Patches/0433-Seed-based-feature-search.patch b/Spigot-Server-Patches/0432-Seed-based-feature-search.patch similarity index 98% rename from Spigot-Server-Patches/0433-Seed-based-feature-search.patch rename to Spigot-Server-Patches/0432-Seed-based-feature-search.patch index 20cadbea96..50f91db3ea 100644 --- a/Spigot-Server-Patches/0433-Seed-based-feature-search.patch +++ b/Spigot-Server-Patches/0432-Seed-based-feature-search.patch @@ -1,4 +1,4 @@ -From 31e07d72b58c1d2e04897ff8fd96ebbd7696093a Mon Sep 17 00:00:00 2001 +From 4493014f9b0f3c1487873cde43f4ff9fcc03aef0 Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Mon, 13 Jan 2020 15:40:32 +0100 Subject: [PATCH] Seed based feature search diff --git a/Spigot-Server-Patches/0434-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/Spigot-Server-Patches/0433-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 97% rename from Spigot-Server-Patches/0434-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to Spigot-Server-Patches/0433-Bees-get-gravity-in-void.-Fixes-MC-167279.patch index 65a31ecab4..38efe9213a 100644 --- a/Spigot-Server-Patches/0434-Bees-get-gravity-in-void.-Fixes-MC-167279.patch +++ b/Spigot-Server-Patches/0433-Bees-get-gravity-in-void.-Fixes-MC-167279.patch @@ -1,4 +1,4 @@ -From ce1fa2f83fae976cff6618e9b8259625ec45edf9 Mon Sep 17 00:00:00 2001 +From e55cf10671e8ba7ac7887ad0fcc5325464705e4a Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Sun, 26 Jan 2020 16:30:19 -0600 Subject: [PATCH] Bees get gravity in void. Fixes MC-167279 diff --git a/Spigot-Server-Patches/0435-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/Spigot-Server-Patches/0434-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 98% rename from Spigot-Server-Patches/0435-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to Spigot-Server-Patches/0434-Optimise-getChunkAt-calls-for-loaded-chunks.patch index 9aee49bfe4..7eb6e39d50 100644 --- a/Spigot-Server-Patches/0435-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/Spigot-Server-Patches/0434-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -1,4 +1,4 @@ -From 24ed4715052f8bea87e47c17cca35d61126cc999 Mon Sep 17 00:00:00 2001 +From 5b8798df76f834fbb0cf8222bdf52126bce0f1ab Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 25 Jan 2020 17:04:35 -0800 Subject: [PATCH] Optimise getChunkAt calls for loaded chunks diff --git a/work/Bukkit b/work/Bukkit index 93e39ce193..d0800d0c1d 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 93e39ce1934a9a7675550c12a7bd4861a2030f2b +Subproject commit d0800d0c1da6659be7e71045f117c89d4e21f9ec diff --git a/work/CraftBukkit b/work/CraftBukkit index ab13a117a9..e82b5477ae 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit ab13a117a910635638886991a2d77a82261b2cb6 +Subproject commit e82b5477ae218e3f8f74b86c87c9f3f29510e818 diff --git a/work/Spigot b/work/Spigot index f2c1cd15d9..b9baf71774 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit f2c1cd15d99e523ef21cd1f761914a2b9eb940b8 +Subproject commit b9baf71774bbb783017c5bb52e646795cf3248cd