From e2c4f20ed1430a6fde29ba1c82d4e886db9467dc Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Thu, 4 Dec 2014 10:10:24 +0000 Subject: [PATCH] Serialize baseColor as a string --- .../org/bukkit/craftbukkit/inventory/CraftMetaBanner.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java index 713d70cd1b..994b9aaac8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java +++ b/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()){