Fixed nomages being able to throw spells

This commit is contained in:
Sollace 2019-03-05 15:16:48 +02:00
parent 903e2462aa
commit 584704c8e3

View file

@ -156,6 +156,10 @@ public class ItemSpell extends Item implements ICastable {
ItemStack stack = player.getHeldItem(hand); ItemStack stack = player.getHeldItem(hand);
if (!Predicates.MAGI.test(player)) {
return new ActionResult<ItemStack>(EnumActionResult.PASS, stack);
}
if (!SpellRegistry.stackHasEnchantment(stack)) { if (!SpellRegistry.stackHasEnchantment(stack)) {
return new ActionResult<ItemStack>(EnumActionResult.FAIL, stack); return new ActionResult<ItemStack>(EnumActionResult.FAIL, stack);
} }