use of org.bukkit.craftbukkit.v1_12_R1.Overridden in project LoliServer by Loli-Server.
the class CraftMetaItem method clone.
@Overridden
@Override
public CraftMetaItem clone() {
try {
CraftMetaItem clone = (CraftMetaItem) super.clone();
if (this.lore != null) {
clone.lore = new ArrayList<String>(this.lore);
}
clone.customModelData = this.customModelData;
clone.blockData = this.blockData;
if (this.enchantments != null) {
clone.enchantments = new LinkedHashMap<Enchantment, Integer>(this.enchantments);
}
if (this.hasAttributeModifiers()) {
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
}
clone.persistentDataContainer = new CraftPersistentDataContainer(this.persistentDataContainer.getRaw(), DATA_TYPE_REGISTRY);
clone.hideFlag = this.hideFlag;
clone.unbreakable = this.unbreakable;
clone.damage = this.damage;
clone.version = this.version;
return clone;
} catch (CloneNotSupportedException e) {
throw new Error(e);
}
}
Aggregations