9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-31 04:46:42 +00:00

improve looty hook check

This commit is contained in:
Boy
2023-01-29 16:44:36 +01:00
parent 73ccddf628
commit c7730429de

View File

@@ -14,7 +14,7 @@ public class LootyHook extends ItemHook implements Listener {
@Override
public ItemStack get(String itemid) {
if (itemid.split(":").length != 2) return null;
if (PrefabKey.Companion.ofOrNull(itemid) == null) return null;
return LootyFactory.INSTANCE.createFromPrefab(PrefabKey.Companion.of(itemid));
}
}