Bugfix attempt: Try-catch in itemutils

This commit is contained in:
Aria 2023-02-22 20:29:47 -07:00
parent e711ba6a2e
commit 87ed217b97
3 changed files with 10 additions and 4 deletions

View file

@ -36,8 +36,14 @@ public class ItemUtils {
{
Integer ret = 0;
Map<Enchantment, Integer> enchants = getEnchantments(stack);
ret=enchants.get(ench);
try{
Map<Enchantment, Integer> enchants = getEnchantments(stack);
ret=enchants.get(ench);
}catch(Exception e)
{
ret =0;
}
return ret;
}