|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.event.Event org.bukkit.event.inventory.InventoryEvent org.bukkit.event.inventory.InventoryInteractEvent
public abstract class InventoryInteractEvent
An abstract base class for events that describe an interaction between a HumanEntity and the contents of an Inventory.
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 | |
---|---|
InventoryInteractEvent(InventoryView transaction)
|
Method Summary | |
---|---|
Event.Result |
getResult()
Gets the Event.Result of this event. |
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(Event.Result) for the Cancellable
interface. |
void |
setResult(Event.Result newResult)
Sets the result of this event. |
Methods inherited from class org.bukkit.event.inventory.InventoryEvent |
---|
getHandlerList, getHandlers, 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 |
---|
public InventoryInteractEvent(InventoryView transaction)
Method Detail |
---|
public HumanEntity getWhoClicked()
public void setResult(Event.Result newResult)
newResult
- the new Event.Result
for this eventisCancelled()
public 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 Cancellable
public void setCancelled(boolean toCancel)
setResult(Event.Result)
for the Cancellable
interface. setResult(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 Cancellable
toCancel
- result becomes DENY if true, ALLOW if false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |