Cancellable
public class InventoryOpenEvent extends InventoryEvent implements Cancellable
Event.Result
transaction
Constructor | Description |
---|---|
InventoryOpenEvent(@NotNull InventoryView transaction) |
Modifier and Type | Method | Description |
---|---|---|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
@NotNull 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.
|
callEvent, getEventName, isAsynchronous
getInventory, getView, getViewers
public InventoryOpenEvent(@NotNull @NotNull InventoryView transaction)
@NotNull public final @NotNull HumanEntity getPlayer()
public boolean isCancelled()
If an inventory open event is cancelled, the inventory screen will not show.
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
If an inventory open event is cancelled, the inventory screen will not show.
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this event@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class InventoryEvent
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.