org.bukkit.event.inventory
Class InventoryOpenEvent

java.lang.Object
  extended by org.bukkit.event.Event
      extended by org.bukkit.event.inventory.InventoryEvent
          extended by org.bukkit.event.inventory.InventoryOpenEvent
All Implemented Interfaces:
Cancellable

public class InventoryOpenEvent
extends InventoryEvent
implements Cancellable

Represents a player related inventory event


Nested Class Summary
 
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
 
Field Summary
 
Fields inherited from class org.bukkit.event.inventory.InventoryEvent
transaction
 
Constructor Summary
InventoryOpenEvent(InventoryView transaction)
           
 
Method Summary
static HandlerList getHandlerList()
           
 HandlerList getHandlers()
           
 HumanEntity getPlayer()
          Returns the player involved in this event
 boolean isCancelled()
          Gets the cancellation state of this event.
 void setCancelled(boolean cancel)
          Sets the cancellation state of this event.
 
Methods inherited from class org.bukkit.event.inventory.InventoryEvent
getInventory, getView, getViewers
 
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InventoryOpenEvent

public InventoryOpenEvent(InventoryView transaction)
Method Detail

getPlayer

public final HumanEntity getPlayer()
Returns the player involved in this event

Returns:
Player who is involved in this event

isCancelled

public boolean 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 If an inventory open event is cancelled, the inventory screen will not show.

Specified by:
isCancelled in interface Cancellable
Returns:
true if this event is cancelled

setCancelled

public void 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 If an inventory open event is cancelled, the inventory screen will not show.

Specified by:
setCancelled in interface Cancellable
Parameters:
cancel - true if you wish to cancel this event

getHandlers

public HandlerList getHandlers()
Overrides:
getHandlers in class InventoryEvent

getHandlerList

public static HandlerList getHandlerList()


Copyright © 2013. All Rights Reserved.