Serialize baseColor as a string

Dieser Commit ist enthalten in:
Thinkofdeath 2014-12-04 10:10:24 +00:00
Ursprung 2ba7357b4a
Commit e2c4f20ed1

Datei anzeigen

@ -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()){