|
|
|
|
@ -281,12 +281,16 @@ public class enchantment_table_listener implements Listener {
|
|
|
|
|
// Add meta to the upgraded item
|
|
|
|
|
ItemMeta meta = item.getItemMeta();
|
|
|
|
|
if (!default_name) {
|
|
|
|
|
meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', name));
|
|
|
|
|
if (name != null)
|
|
|
|
|
meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', name));
|
|
|
|
|
} else {
|
|
|
|
|
meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', original_name));
|
|
|
|
|
if (original_name != null)
|
|
|
|
|
meta.setDisplayName(ChatColor.translateAlternateColorCodes('&', original_name));
|
|
|
|
|
}
|
|
|
|
|
if (lore != null) {
|
|
|
|
|
lore = lore.stream().map(s -> ChatColor.translateAlternateColorCodes('&', s)).collect(Collectors.toList());
|
|
|
|
|
meta.setLore(lore);
|
|
|
|
|
}
|
|
|
|
|
lore = lore.stream().map(s -> ChatColor.translateAlternateColorCodes('&', s)).collect(Collectors.toList());
|
|
|
|
|
meta.setLore(lore);
|
|
|
|
|
item.setItemMeta(meta);
|
|
|
|
|
|
|
|
|
|
// Fetch the enchantments directly from the upgraded item data and add to the item
|
|
|
|
|
|