3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

Merge pull request #22 in SPIGOT/craftbukkit from ~FEARTHE1337/craftbukkit:fixCraftMetaBanner to master

* commit '351edbf4e5dc679dfe65258c6919e9a2a75f7ae8':
  Fix CraftMetaBanner serialization.
Dieser Commit ist enthalten in:
Thinkofdeath 2014-12-02 16:47:25 +01:00
Commit 2b61a04e36
2 geänderte Dateien mit 8 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -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);
if(base != null){
builder.put(BASE.BUKKIT, base); builder.put(BASE.BUKKIT, base);
}
if(!patterns.isEmpty()){
builder.put(PATTERNS.BUKKIT, ImmutableList.copyOf(patterns)); builder.put(PATTERNS.BUKKIT, ImmutableList.copyOf(patterns));
}
return builder; return builder;
} }

Datei anzeigen

@ -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")