类 InventoryInteractEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.inventory.InventoryEvent
org.bukkit.event.inventory.InventoryInteractEvent
- 所有已实现的接口:
Cancellable
- 直接已知子类:
InventoryClickEvent
,InventoryDragEvent
An abstract base class for events that describe an interaction between a
HumanEntity and the contents of an Inventory.
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
Event.Result
-
字段概要
从类继承的字段 org.bukkit.event.inventory.InventoryEvent
transaction
-
构造器概要
-
方法概要
修饰符和类型方法说明Gets theEvent.Result
of this event.Gets the player who performed the click.boolean
Gets whether or not this event is cancelled.void
setCancelled
(boolean toCancel) Proxy method tosetResult(Event.Result)
for the Cancellable interface.void
setResult
(Event.Result newResult) Sets the result of this event.从类继承的方法 org.bukkit.event.inventory.InventoryEvent
getHandlerList, getHandlers, getInventory, getView, getViewers
从类继承的方法 org.bukkit.event.Event
getEventName, isAsynchronous
-
构造器详细资料
-
InventoryInteractEvent
-
-
方法详细资料
-
getWhoClicked
Gets the player who performed the click.- 返回:
- The clicking player.
-
setResult
Sets the result of this event. This will change whether or not this event is considered cancelled.- 参数:
newResult
- the newEvent.Result
for this event- 另请参阅:
-
getResult
Gets theEvent.Result
of this event. The Result describes the behavior that will be applied to the inventory in relation to this event.- 返回:
- the Result of this event.
-
isCancelled
public boolean isCancelled()Gets whether or not this event is cancelled. This is based off of the Result value returned bygetResult()
. 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
在接口中Cancellable
- 返回:
- whether the event is cancelled
-
setCancelled
public void setCancelled(boolean toCancel) Proxy method tosetResult(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
在接口中Cancellable
- 参数:
toCancel
- result becomes DENY if true, ALLOW if false
-