Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.player.PlayerFishEvent Class Reference
Inheritance diagram for org.bukkit.event.player.PlayerFishEvent:
org.bukkit.event.player.PlayerEvent org.bukkit.event.Cancellable org.bukkit.event.Event

Classes

enum  State
 

Public Member Functions

 PlayerFishEvent (final Player player, final Entity entity, final State state)
 
 PlayerFishEvent (final Player player, final Entity entity, final Fish hookEntity, final State state)
 
Entity getCaught ()
 
Fish getHook ()
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
int getExpToDrop ()
 
void setExpToDrop (int amount)
 
State getState ()
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.player.PlayerEvent
 PlayerEvent (final Player who)
 
final Player getPlayer ()
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 
 Event (boolean isAsync)
 
String getEventName ()
 
abstract HandlerList getHandlers ()
 
final boolean isAsynchronous ()
 

Static Public Member Functions

static HandlerList getHandlerList ()
 

Additional Inherited Members

- Protected Attributes inherited from org.bukkit.event.player.PlayerEvent
Player player
 

Detailed Description

Thrown when a player is fishing

Definition at line 12 of file PlayerFishEvent.java.

Constructor & Destructor Documentation

org.bukkit.event.player.PlayerFishEvent.PlayerFishEvent ( final Player  player,
final Entity  entity,
final State  state 
)
Deprecated:
replaced by Entity, Fish, State) to include the Fish hook entity.
Parameters
player
entity
state

Definition at line 28 of file PlayerFishEvent.java.

28  {
29  this(player, entity, null, state);
30  }

Member Function Documentation

Entity org.bukkit.event.player.PlayerFishEvent.getCaught ( )

Gets the entity caught by the player

Returns
Entity caught by the player, null if fishing, bobber has gotten stuck in the ground or nothing has been caught

Definition at line 45 of file PlayerFishEvent.java.

45  {
46  return entity;
47  }
int org.bukkit.event.player.PlayerFishEvent.getExpToDrop ( )

Gets the amount of experience received when fishing.

Note: This value has no default effect unless the event state is State#CAUGHT_FISH.

Returns
the amount of experience to drop

Definition at line 74 of file PlayerFishEvent.java.

74  {
75  return exp;
76  }
Fish org.bukkit.event.player.PlayerFishEvent.getHook ( )

Gets the fishing hook.

Returns
Fish the entity representing the fishing hook/bobber.

Definition at line 54 of file PlayerFishEvent.java.

54  {
55  return hookEntity;
56  }
State org.bukkit.event.player.PlayerFishEvent.getState ( )

Gets the state of the fishing

Returns
A State detailing the state of the fishing

Definition at line 95 of file PlayerFishEvent.java.

95  {
96  return state;
97  }
boolean org.bukkit.event.player.PlayerFishEvent.isCancelled ( )

Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins

Returns
true if this event is cancelled

Implements org.bukkit.event.Cancellable.

Definition at line 58 of file PlayerFishEvent.java.

58  {
59  return cancel;
60  }
void org.bukkit.event.player.PlayerFishEvent.setCancelled ( boolean  cancel)

Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Parameters
canceltrue if you wish to cancel this event

Implements org.bukkit.event.Cancellable.

Definition at line 62 of file PlayerFishEvent.java.

62  {
63  this.cancel = cancel;
64  }
void org.bukkit.event.player.PlayerFishEvent.setExpToDrop ( int  amount)

Sets the amount of experience received when fishing.

Note: This value has no default effect unless the event state is State#CAUGHT_FISH.

Parameters
amountthe amount of experience to drop

Definition at line 86 of file PlayerFishEvent.java.

86  {
87  exp = amount;
88  }

The documentation for this class was generated from the following file: