Package org.bukkit.event.inventory
Class InventoryOpenEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.inventory.InventoryEvent
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
-
Field Summary
-
Constructor Summary
Constructors Constructor Description InventoryOpenEvent(InventoryView transaction) -
Method Summary
Modifier and Type Method Description static HandlerListgetHandlerList()HandlerListgetHandlers()HumanEntitygetPlayer()Returns the player involved in this eventbooleanisCancelled()Gets the cancellation state of this event.voidsetCancelled(boolean cancel)Sets the cancellation state of this event.Methods inherited from class org.bukkit.event.inventory.InventoryEvent
getInventory, getView, getViewers
-
Constructor Details
-
Method Details
-
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:
isCancelledin interfaceCancellable- 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:
setCancelledin interfaceCancellable- Parameters:
cancel- true if you wish to cancel this event
-
getHandlers
- Overrides:
getHandlersin classInventoryEvent
-
getHandlerList
-