use of org.bukkit.block.banner.Pattern in project Glowstone by GlowstoneMC.
the class GlowMetaBanner method serialize.
@Override
@NotNull
public Map<String, Object> serialize() {
Map<String, Object> result = super.serialize();
result.put("meta-type", "BANNER");
List<Map<String, String>> patternsList = new ArrayList<>();
for (Pattern pattern : patterns) {
patternsList.add(ImmutableMap.of(pattern.getPattern().toString(), pattern.getColor().toString()));
}
result.put("pattern", patternsList);
if (baseColor != null) {
result.put("baseColor", baseColor);
}
return result;
}
Aggregations