useOnEntity

public ActionResult useOnEntity(ItemStack staffStack, World world, LivingEntity user, LivingEntity target, Hand hand)(source)

Called on both the client and the server by Minecraft, when an entity uses the staff on an entity. This method may not be called, if the entity handles the use event (for example, a horse). This method will not be called, if the player is in spectator mode.

On the logical client, the return values have the following meaning:

On the logical server, the return values have the following meaning (if used by player):

On the logical server, the return values are processed by the caller code (if not used by player).

Parameters

staffStack

The item stack used to perform the action

world

The world the user is in

user

The entity, which used the staff

target

The entity, on which user used the staff

hand

The hand of the user, in which the staff is

See also