public class ItemFishedEvent extends PlayerEvent
Cancelable
Canceling the event will cause the player to receive no items at all.
The hook will still take the damage specifiedPlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.Visibility
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Event.HasResult, Event.Result
Constructor and Description |
---|
ItemFishedEvent(java.util.List<ItemStack> stacks,
int rodDamage,
EntityFishHook hook) |
Modifier and Type | Method and Description |
---|---|
void |
damageRodBy(int rodDamage)
Specifies the amount of damage that the fishing rod should take.
|
NonNullList<ItemStack> |
getDrops()
Use this to get the items the player will receive.
|
EntityFishHook |
getHookEntity()
Use this to stuff related to the hook itself, like the position of the bobber.
|
int |
getRodDamage()
Get the damage the rod will take.
|
getEntityPlayer
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public ItemFishedEvent(java.util.List<ItemStack> stacks, int rodDamage, EntityFishHook hook)
public int getRodDamage()
public void damageRodBy(@Nonnegative int rodDamage)
rodDamage
- The damage the rod will take. Must be nonnegativepublic NonNullList<ItemStack> getDrops()
public EntityFishHook getHookEntity()