mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-18 04:51:20 +01:00
Removed key_skip on PacketSetCreativeSlot
This commit is contained in:
parent
1708555dd0
commit
21e3c22462
@ -41,7 +41,7 @@ public final class EnchantDisplay {
|
|||||||
/**
|
/**
|
||||||
* The meta key to hide enchantments in lore
|
* The meta key to hide enchantments in lore
|
||||||
*
|
*
|
||||||
* Only used for parity in setcreative slot.
|
* Only used for parity in setcreativeslot.
|
||||||
* More robust method to be introduced
|
* More robust method to be introduced
|
||||||
*
|
*
|
||||||
* @deprecated Temporary fix
|
* @deprecated Temporary fix
|
||||||
@ -145,9 +145,12 @@ public final class EnchantDisplay {
|
|||||||
meta.getPersistentDataContainer().remove(KEY);
|
meta.getPersistentDataContainer().remove(KEY);
|
||||||
itemLore.removeIf((s) -> s.startsWith(prefix));
|
itemLore.removeIf((s) -> s.startsWith(prefix));
|
||||||
|
|
||||||
if(meta instanceof EnchantmentStorageMeta)
|
if(!meta.getPersistentDataContainer().has(KEY_SKIP, PersistentDataType.INTEGER)) {
|
||||||
meta.removeItemFlags(ItemFlag.HIDE_POTION_EFFECTS); // Thanks ShaneBee!
|
if (meta instanceof EnchantmentStorageMeta)
|
||||||
meta.removeItemFlags(ItemFlag.HIDE_ENCHANTS);
|
meta.removeItemFlags(ItemFlag.HIDE_POTION_EFFECTS); // Thanks ShaneBee!
|
||||||
|
meta.removeItemFlags(ItemFlag.HIDE_ENCHANTS);
|
||||||
|
}
|
||||||
|
meta.getPersistentDataContainer().remove(KEY_SKIP);
|
||||||
meta.setLore(itemLore);
|
meta.setLore(itemLore);
|
||||||
item.setItemMeta(meta);
|
item.setItemMeta(meta);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user