From 23d7d25afeaffb9ec4c722f3ef9ab5d505fead25 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sun, 6 Aug 2017 16:36:48 +0100 Subject: [PATCH] fix construction order in CraftBanner --- ...ix-construction-order-in-CraftBanner.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Spigot-Server-Patches/fix-construction-order-in-CraftBanner.patch diff --git a/Spigot-Server-Patches/fix-construction-order-in-CraftBanner.patch b/Spigot-Server-Patches/fix-construction-order-in-CraftBanner.patch new file mode 100644 index 0000000000..70820aed4a --- /dev/null +++ b/Spigot-Server-Patches/fix-construction-order-in-CraftBanner.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Sun, 6 Aug 2017 16:25:31 +0100 +Subject: [PATCH] fix construction order in CraftBanner + + +diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java +index f374385e9..def728dd8 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java +@@ -0,0 +0,0 @@ import org.bukkit.block.banner.PatternType; + public class CraftBanner extends CraftBlockEntityState implements Banner { + + private DyeColor base; +- private List patterns = new ArrayList(); ++ private List patterns; /* = new ArrayList(); */ // Paper + + public CraftBanner(final Block block) { + super(block, TileEntityBanner.class); +@@ -0,0 +0,0 @@ public class CraftBanner extends CraftBlockEntityState impleme + super.load(banner); + + base = DyeColor.getByDyeData((byte) banner.color.getInvColorIndex()); ++ patterns = new ArrayList<>(); // Paper - Ensure that patterns is initialized + + if (banner.patterns != null) { + for (int i = 0; i < banner.patterns.size(); i++) { +-- \ No newline at end of file