canSwingHand

public Boolean canSwingHand(ItemStack staffStack, World world, LivingEntity holder, Hand hand)(source)

Called on both the client and the server by Staff Mod on Fabric and Neo/Forge API on Neo/Forge, when an entity holding a staff tries to swing its hand.

Return

true to allow hand swing, false to cancel it

Parameters

staffStack

The item stack used to perform the action

world

The world the holder is in

holder

The entity, which holds the staff

hand

The hand of the holder, in which the staff is