9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2026-01-06 15:51:50 +00:00

feat: destroy loose items cover gamemode switch

This commit is contained in:
LoJoSho
2023-04-23 10:47:44 -05:00
parent dd805f1860
commit c37f52bbb1
2 changed files with 15 additions and 0 deletions

View File

@@ -143,6 +143,7 @@ public class InventoryUtils {
}
public static boolean isCosmeticItem(ItemStack itemStack) {
if (itemStack == null) return false;
itemStack = itemStack.clone();
if (!itemStack.hasItemMeta()) return false;
return itemStack.getItemMeta().getPersistentDataContainer().has(getCosmeticKey(), PersistentDataType.STRING);