From 986787060f34e2a5063bfdc0f5272714e55ea5fe Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 4 Dec 2014 10:10:24 +0000 Subject: [PATCH] Serialize baseColor as a string By: Thinkofdeath --- .../org/bukkit/craftbukkit/inventory/CraftMetaBanner.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java index 713d70cd1b..994b9aaac8 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java @@ -60,7 +60,10 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta { CraftMetaBanner(Map map) { super(map); - base = SerializableMeta.getObject(DyeColor.class, map, BASE.BUKKIT, true); + String baseStr = SerializableMeta.getString(map, BASE.BUKKIT, true); + if (baseStr != null) { + base = DyeColor.valueOf(baseStr); + } Iterable rawPatternList = SerializableMeta.getObject(Iterable.class, map, PATTERNS.BUKKIT, true); if (rawPatternList == null) { @@ -146,7 +149,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta { super.serialize(builder); if(base != null){ - builder.put(BASE.BUKKIT, base); + builder.put(BASE.BUKKIT, base.toString()); } if(!patterns.isEmpty()){