CancellableInventoryClickEvent, InventoryDragEvent, TradeSelectEventpublic abstract class InventoryInteractEvent extends InventoryEvent implements Cancellable
Event.Resulttransaction| Constructor | Description |
|---|---|
InventoryInteractEvent(@NotNull InventoryView transaction) |
| Modifier and Type | Method | Description |
|---|---|---|
@NotNull Event.Result |
getResult() |
Gets the
Event.Result of this event. |
@NotNull HumanEntity |
getWhoClicked() |
Gets the player who performed the click.
|
boolean |
isCancelled() |
Gets whether or not this event is cancelled.
|
void |
setCancelled(boolean toCancel) |
Proxy method to
setResult(org.bukkit.event.Event.Result) for the Cancellable
interface. |
void |
setResult(@NotNull Event.Result newResult) |
Sets the result of this event.
|
getEventName, isAsynchronousgetHandlerList, getHandlers, getInventory, getView, getViewerspublic InventoryInteractEvent(@NotNull
@NotNull InventoryView transaction)
@NotNull public @NotNull HumanEntity getWhoClicked()
public void setResult(@NotNull
@NotNull Event.Result newResult)
newResult - the new Event.Result for this eventisCancelled()@NotNull public @NotNull Event.Result getResult()
Event.Result of this event. The Result describes the
behavior that will be applied to the inventory in relation to this
event.public boolean isCancelled()
getResult(). Result.ALLOW and
Result.DEFAULT will result in a returned value of false, but
Result.DENY will result in a returned value of true.
Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
isCancelled in interface Cancellablepublic void setCancelled(boolean toCancel)
setResult(org.bukkit.event.Event.Result) for the Cancellable
interface. setResult(org.bukkit.event.Event.Result) is preferred, as it allows
you to specify the Result beyond Result.DENY and Result.ALLOW.
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
setCancelled in interface CancellabletoCancel - result becomes DENY if true, ALLOW if falseCopyright © 2020. All rights reserved.