Bugfix attempt: Try-catch in itemutils
This commit is contained in:
parent
e711ba6a2e
commit
87ed217b97
3 changed files with 10 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Reference in a new issue