类 InventoryInteractEvent
- 所有已实现的接口:
Cancellable
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
Event.Result -
字段概要
从类继承的字段 org.bukkit.event.inventory.InventoryEvent
transaction -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明获取此事件的Event.Result。获取执行点击的玩家。boolean获取此事件是否被取消。voidsetCancelled(boolean toCancel) Cancellable 接口的setResult(org.bukkit.event.Event.Result)代理方法。voidsetResult(@NotNull Event.Result newResult) 设置此事件的结果。从类继承的方法 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.
-
setResult
设置此事件的结果。这将改变此事件是否被视为已取消。- 参数:
newResult- 此事件的新Event.Result- 另请参阅:
-
getResult
获取此事件的Event.Result。Result 描述了将应用于此事件相关物品栏的行为。- 返回:
- 此事件的结果
原文:Gets the
Event.Resultof this event. The Result describes the behavior that will be applied to the inventory in relation to this event.
-
isCancelled
public boolean isCancelled()获取此事件是否被取消。这基于getResult()返回的 Result 值。Result.ALLOW 和 Result.DEFAULT 将导致返回值为 false,但 Result.DENY 将导致返回值为 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- 返回:
- 事件是否被取消
原文:Gets whether or not this event is cancelled. This is based off of the Result value returned by
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.
-
setCancelled
public void setCancelled(boolean toCancel) Cancellable 接口的setResult(org.bukkit.event.Event.Result)代理方法。推荐使用setResult(org.bukkit.event.Event.Result),因为它允许您指定超出 Result.DENY 和 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- 如果为 true,结果变为 DENY;如果为 false,结果变为 ALLOW原文:Proxy method to
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.
-