Serialize baseColor as a string

This commit is contained in:
Thinkofdeath 2014-12-04 10:10:24 +00:00
parent 2ba7357b4a
commit e2c4f20ed1

View File

@ -60,7 +60,10 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
CraftMetaBanner(Map<String, Object> map) { CraftMetaBanner(Map<String, Object> map) {
super(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); Iterable<?> rawPatternList = SerializableMeta.getObject(Iterable.class, map, PATTERNS.BUKKIT, true);
if (rawPatternList == null) { if (rawPatternList == null) {
@ -146,7 +149,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
super.serialize(builder); super.serialize(builder);
if(base != null){ if(base != null){
builder.put(BASE.BUKKIT, base); builder.put(BASE.BUKKIT, base.toString());
} }
if(!patterns.isEmpty()){ if(!patterns.isEmpty()){