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:
parent
346a4386b3
commit
9da3370edf
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user