mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
Serialize baseColor as a string
This commit is contained in:
parent
2ba7357b4a
commit
e2c4f20ed1
@ -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()){
|
||||||
|
Loading…
Reference in New Issue
Block a user