PlayerSleepInBed

Link to playersleepinbed

当玩家睡觉时,玩家会被发射。 此事件可以通过设置 结果 来控制玩家是否能够睡觉。

You will need to cast the event in the function header as this class:
crafttweaker.event.PlayerSleepInBedEvent
You can, of course, also import the class before and use that name then.

Event interface extensions

Link to event-interface-extensions

PlayerSleepInBed Events implement the following interfaces and are able to call all of their methods/getters/setters as well:

  • NOT_POSSIBLE_HERE
  • NOT_POSSIBLE_NOW
  • NOT_SAFE
  • 好的
  • OTHER_PROBLEM
  • TOO_FOR_AWAY

The following information can be retrieved from the event:

ZenGetter返回值类型
ZenGetter
x
返回值类型
int
ZenGetter
y
返回值类型
int
ZenGetter
z
返回值类型
int
ZenGetter
player
返回值类型
IPlayer
ZenGetter
result
返回值类型
字符串 (上面可能的值)

以下可以在事件中设置:

ZenSetter参数类型
ZenSetter
result
参数类型
字符串 (上面可能的值)