mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
Fix CraftMetaBanner serialization.
This commit is contained in:
parent
275603d37a
commit
351edbf4e5
2 changed files with 8 additions and 2 deletions
|
@ -145,8 +145,13 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
|
||||||
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
|
ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
|
||||||
super.serialize(builder);
|
super.serialize(builder);
|
||||||
|
|
||||||
builder.put(BASE.BUKKIT, base);
|
if(base != null){
|
||||||
builder.put(PATTERNS.BUKKIT, ImmutableList.copyOf(patterns));
|
builder.put(BASE.BUKKIT, base);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!patterns.isEmpty()){
|
||||||
|
builder.put(PATTERNS.BUKKIT, ImmutableList.copyOf(patterns));
|
||||||
|
}
|
||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,6 +96,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
classMap = ImmutableMap.<Class<? extends CraftMetaItem>, String>builder()
|
classMap = ImmutableMap.<Class<? extends CraftMetaItem>, String>builder()
|
||||||
|
.put(CraftMetaBanner.class, "BANNER")
|
||||||
.put(CraftMetaBook.class, "BOOK")
|
.put(CraftMetaBook.class, "BOOK")
|
||||||
.put(CraftMetaSkull.class, "SKULL")
|
.put(CraftMetaSkull.class, "SKULL")
|
||||||
.put(CraftMetaLeatherArmor.class, "LEATHER_ARMOR")
|
.put(CraftMetaLeatherArmor.class, "LEATHER_ARMOR")
|
||||||
|
|
Loading…
Reference in a new issue