From 61ef48e0ce41666dc6ee3992fcb74efdf300b1b8 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 5 Dec 2021 15:10:39 +0000 Subject: [PATCH] Revert "fix NPE from changes in e4358b82171" This reverts commit aa3d405b3604dd9d49c22961aa74b382afa46dd5. --- .../fix-NPE-from-changes-in-e4358b82171.patch | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 patches/api/fix-NPE-from-changes-in-e4358b82171.patch diff --git a/patches/api/fix-NPE-from-changes-in-e4358b82171.patch b/patches/api/fix-NPE-from-changes-in-e4358b82171.patch deleted file mode 100644 index 23da099d5..000000000 --- a/patches/api/fix-NPE-from-changes-in-e4358b82171.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Gabriel Wolf -Date: Sun, 5 Dec 2021 14:36:05 +0000 -Subject: [PATCH] fix NPE from changes in e4358b82171 - - -diff --git a/src/main/java/org/bukkit/configuration/MemorySection.java b/src/main/java/org/bukkit/configuration/MemorySection.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/org/bukkit/configuration/MemorySection.java -+++ b/src/main/java/org/bukkit/configuration/MemorySection.java -@@ -0,0 +0,0 @@ public class MemorySection implements ConfigurationSection { - int i1 = -1, i2; - ConfigurationSection section = this; - while ((i1 = path.indexOf(separator, i2 = i1 + 1)) != -1) { -- if (section == null || !section.contains(path.substring(i2, i1), true)) { -+ final String currentPath = path.substring(i2, i1); -+ if (!section.contains(currentPath, true)) { -+ return def; -+ } -+ section = section.getConfigurationSection(currentPath); -+ if(section == null) { - return def; - } - section = section.getConfigurationSection(path.substring(i2, i1));