Package org.bukkit.event.player
Class PlayerBedLeaveEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerBedLeaveEvent
- All Implemented Interfaces:
- Cancellable
This event is fired when the player is leaving a bed.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerBedLeaveEvent(@NotNull Player who, @NotNull Block bed, boolean setBedSpawn) 
- 
Method SummaryModifier and TypeMethodDescriptiongetBed()Returns the bed block involved in this event.static @NotNull HandlerListbooleanGets the cancellation state of this event.voidsetCancelled(boolean cancelled) Sets the cancellation state of this event.voidsetSpawnLocation(boolean setBedSpawn) Deprecated, for removal: This API element is subject to removal in a future version.the respawn point is now set when the player enter the bed and this option doesn't work since MC 1.15.booleanDeprecated, for removal: This API element is subject to removal in a future version.the respawn point is now set when the player enter the bed and this option doesn't work since MC 1.15.Methods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
PlayerBedLeaveEvent
 
- 
- 
Method Details- 
getBedReturns the bed block involved in this event.- Returns:
- the bed block involved in this event
 
- 
shouldSetSpawnLocationDeprecated, for removal: This API element is subject to removal in a future version.the respawn point is now set when the player enter the bed and this option doesn't work since MC 1.15.Get if this event should set the new spawn location for thePlayer.
 This does not remove any existing spawn location, only prevent it from being changed (if true).
 To change aPlayer's spawn location, usePlayer.setBedSpawnLocation(Location).- Returns:
- true if the spawn location will be changed
 
- 
setSpawnLocationDeprecated, for removal: This API element is subject to removal in a future version.the respawn point is now set when the player enter the bed and this option doesn't work since MC 1.15.Set if this event should set the new spawn location for thePlayer.
 This will not remove any existing spawn location, only prevent it from being changed (if true).
 To change aPlayer's spawn location, usePlayer.setBedSpawnLocation(Location).- Parameters:
- setBedSpawn- true to change the new spawn location
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancelled) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancelled- true if you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-