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

Public Member Functions

 PlayerItemHeldEvent (final Player player, final int previous, final int current)
 
int getPreviousSlot ()
 
int getNewSlot ()
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
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

Fired when a player changes their currently held item

Definition at line 10 of file PlayerItemHeldEvent.java.

Member Function Documentation

int org.bukkit.event.player.PlayerItemHeldEvent.getNewSlot ( )

Gets the new held slot index

Returns
New slot index

Definition at line 36 of file PlayerItemHeldEvent.java.

36  {
37  return current;
38  }
int org.bukkit.event.player.PlayerItemHeldEvent.getPreviousSlot ( )

Gets the previous held slot index

Returns
Previous slot index

Definition at line 27 of file PlayerItemHeldEvent.java.

27  {
28  return previous;
29  }
boolean org.bukkit.event.player.PlayerItemHeldEvent.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 40 of file PlayerItemHeldEvent.java.

40  {
41  return cancel;
42  }
void org.bukkit.event.player.PlayerItemHeldEvent.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 44 of file PlayerItemHeldEvent.java.

44  {
45  this.cancel = cancel;
46  }

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