mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-14 14:25:11 +01:00
fix npe when passing null to displayname for an item in an inventory menu
This commit is contained in:
parent
805fb9d1e8
commit
6b58aa77a0
@ -192,7 +192,7 @@ public class nInventoryUtil {
|
||||
|
||||
public Item(ItemStack is, String itemDisplayname, List<String> itemLore, Placeholder[] placeholders, Enchantment[] itemEnchantments, ItemFlag[] itemFlags) {
|
||||
this.is = is;
|
||||
this.itemDisplayname = ChatColor.translateAlternateColorCodes('&', itemDisplayname);
|
||||
this.itemDisplayname = itemDisplayname == null ? null : ChatColor.translateAlternateColorCodes('&', itemDisplayname);
|
||||
this.itemLore = itemLore;
|
||||
this.placeholders = placeholders;
|
||||
this.itemEnchantments = itemEnchantments;
|
||||
|
Loading…
Reference in New Issue
Block a user