类 PlayerBedEnterEvent
- 所有已实现的接口:
Cancellable
-
嵌套类概要
嵌套类从类继承的嵌套类/接口 org.bukkit.event.Event
Event.Result -
字段概要
从类继承的字段 org.bukkit.event.player.PlayerEvent
player -
构造器概要
构造器构造器说明PlayerBedEnterEvent(@NotNull Player who, @NotNull Block bed) 已过时。PlayerBedEnterEvent(@NotNull Player who, @NotNull Block bed, @NotNull PlayerBedEnterEvent.BedEnterResult bedEnterResult) -
方法概要
修饰符和类型方法说明getBed()返回此事件涉及的床.描述此事件的默认结果.static @NotNull HandlerListboolean获取此事件的取消状态。voidsetCancelled(boolean cancel) 设置此事件的取消状态。voidsetUseBed(@NotNull Event.Result useBed) 设置对交互的床采取的操作.useBed()控制对点击的床采取的操作.从类继承的方法 org.bukkit.event.player.PlayerEvent
getPlayer从类继承的方法 org.bukkit.event.Event
getEventName, isAsynchronous
-
构造器详细资料
-
方法详细资料
-
getBedEnterResult
描述此事件的默认结果.原文: This describes the default outcome of this event.
- 返回:
- 表示此事件默认结果的床进入结果
-
useBed
控制对点击的床采取的操作.原文: This controls the action to take with the bed that was clicked on.
In case of
Event.Result.DEFAULT, the default outcome is described bygetBedEnterResult().- 返回:
- 对交互的床采取的操作
- 另请参阅:
-
setUseBed
设置对交互的床采取的操作.原文: Sets the action to take with the interacted bed.
Event.Result.ALLOWwill result in the player sleeping, regardless of the default outcome described bygetBedEnterResult().
Event.Result.DENYwill prevent the player from sleeping. This has the same effect as canceling the event viasetCancelled(boolean).
Event.Result.DEFAULTwill result in the outcome described bygetBedEnterResult().- 参数:
useBed- 对交互的床采取的操作- 另请参阅:
-
isCancelled
public boolean isCancelled()获取此事件的取消状态。设置为 true 以阻止玩家睡觉.原文: Gets the cancellation state of this event. Set to true if you want to prevent the player from sleeping.
Canceling the event has the same effect as setting
useBed()toEvent.Result.DENY.For backwards compatibility reasons this also returns true if
useBed()isEvent.Result.DEFAULTand thedefault actionis to prevent bed entering.- 指定者:
isCancelled在接口中Cancellable- 返回:
- 布尔值取消状态
-
setCancelled
public void setCancelled(boolean cancel) 设置此事件的取消状态。取消的事件不会在服务器中执行,但仍会传递给其他插件.原文: Sets the cancellation state of this event. A canceled event will not be executed in the server, but will still pass to other plugins.
Canceling this event will prevent use of the bed.
- 指定者:
setCancelled在接口中Cancellable- 参数:
cancel- 如果希望取消此事件则为 true
-
getBed
返回此事件涉及的床.原文:Returns the bed block involved in this event.
- 返回:
- 床
-
getHandlers
- 指定者:
getHandlers在类中Event
-
getHandlerList
-