public class PlayerBedLeaveEvent extends PlayerEvent implements Cancellable
Event.Result
player
Constructor and Description |
---|
PlayerBedLeaveEvent(@NotNull Player who,
@NotNull Block bed,
boolean setBedSpawn) |
Modifier and Type | Method and Description |
---|---|
@NotNull Block |
getBed()
Returns the bed block involved in this event.
|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancelled)
Sets the cancellation state of this event.
|
void |
setSpawnLocation(boolean setBedSpawn)
Set if this event should set the new spawn location for the
Player . |
boolean |
shouldSetSpawnLocation()
Get if this event should set the new spawn location for the
Player . |
getPlayer
callEvent, getEventName, isAsynchronous
@NotNull public @NotNull Block getBed()
public boolean shouldSetSpawnLocation()
Player
.
Player
's spawn location, use
Player.setBedSpawnLocation(Location)
.public void setSpawnLocation(boolean setBedSpawn)
Player
.
Player
's spawn location, use
Player.setBedSpawnLocation(Location)
.setBedSpawn
- true to change the new spawn locationpublic boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancelled)
Cancellable
setCancelled
in interface Cancellable
cancelled
- true if you wish to cancel this event@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.