1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00

Fixed itemstack fixing ;)

This commit is contained in:
PrzemoVi 2018-12-11 18:48:28 +01:00 committed by GitHub
parent 346a4386b3
commit 9da3370edf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,12 +145,11 @@ public class AncientAltarListener implements Listener {
public static ItemStack fixItemStack(ItemStack itemStack, String customName) { public static ItemStack fixItemStack(ItemStack itemStack, String customName) {
ItemStack stack = itemStack.clone(); ItemStack stack = itemStack.clone();
if (customName.equals(StringUtils.formatItemName(new CustomItem(itemStack, 1), false))) { if (customName.equals(StringUtils.formatItemName(new ItemStack(itemStack.getType()), false))) {
ItemMeta im = stack.getItemMeta(); ItemMeta im = stack.getItemMeta();
im.setDisplayName(null); im.setDisplayName(null);
stack.setItemMeta(im); stack.setItemMeta(im);
} } else {
else {
ItemMeta im = stack.getItemMeta(); ItemMeta im = stack.getItemMeta();
im.setDisplayName(customName); im.setDisplayName(customName);
stack.setItemMeta(im); stack.setItemMeta(im);