From 041250dfb90085e959539a565ec16031b4f34fa5 Mon Sep 17 00:00:00 2001 From: Riley Park Date: Thu, 21 Sep 2017 07:01:40 -0700 Subject: [PATCH] Avoid NPE in AdvancementDataWorld thanks to Spigot being dumb --- .../Add-PlayerInitialSpawnEvent.patch | 2 +- ...ancementDataWorld-thanks-to-Spigot-b.patch | 20 +++++++++++++++++++ ...figurable-Chunk-IO-Thread-Base-Count.patch | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 Spigot-Server-Patches/Avoid-NPE-in-AdvancementDataWorld-thanks-to-Spigot-b.patch diff --git a/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch index 34d9a224cf..c88ccf037e 100644 --- a/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/Add-PlayerInitialSpawnEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add PlayerInitialSpawnEvent For modifying a player's initial spawn location as they join the server diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index b9920a5fc..b90407d18 100644 +index b3356b40f..128f55287 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { diff --git a/Spigot-Server-Patches/Avoid-NPE-in-AdvancementDataWorld-thanks-to-Spigot-b.patch b/Spigot-Server-Patches/Avoid-NPE-in-AdvancementDataWorld-thanks-to-Spigot-b.patch new file mode 100644 index 0000000000..0407058235 --- /dev/null +++ b/Spigot-Server-Patches/Avoid-NPE-in-AdvancementDataWorld-thanks-to-Spigot-b.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Riley Park +Date: Thu, 21 Sep 2017 07:00:43 -0700 +Subject: [PATCH] Avoid NPE in AdvancementDataWorld thanks to Spigot being dumb + + +diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java +index 9ce3e1365..712fc1f9b 100644 +--- a/src/main/java/org/spigotmc/SpigotConfig.java ++++ b/src/main/java/org/spigotmc/SpigotConfig.java +@@ -0,0 +0,0 @@ public class SpigotConfig + } + + public static boolean disableAdvancementSaving; +- public static List disabledAdvancements; ++ public static List disabledAdvancements = java.util.Collections.emptyList(); // Paper - avoid NPE in AdvancementDataWorld + private static void disabledAdvancements() { + disableAdvancementSaving = getBoolean("advancements.disable-saving", false); + disabledAdvancements = getList("advancements.disabled", Arrays.asList(new String[]{"minecraft:story/disabled"})); +-- \ No newline at end of file diff --git a/Spigot-Server-Patches/Configurable-Chunk-IO-Thread-Base-Count.patch b/Spigot-Server-Patches/Configurable-Chunk-IO-Thread-Base-Count.patch index 3ebd09e004..c93e537c89 100644 --- a/Spigot-Server-Patches/Configurable-Chunk-IO-Thread-Base-Count.patch +++ b/Spigot-Server-Patches/Configurable-Chunk-IO-Thread-Base-Count.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable Chunk IO Thread Base Count diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 007589314..9a6f87e59 100644 +index b5795b6d3..36689db74 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig {