mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 19:46:42 +01:00
Fixed nomages being able to throw spells
This commit is contained in:
parent
903e2462aa
commit
584704c8e3
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue