Package org.spigotmc.event.player
Class PlayerSpawnLocationEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.spigotmc.event.player.PlayerSpawnLocationEvent
- Direct Known Subclasses:
- PlayerInitialSpawnEvent
Called when player is about to spawn in a world after joining the server.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.player.PlayerEventplayer
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerSpawnLocationEvent(@NotNull Player who, @NotNull Location spawnLocation) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic @NotNull HandlerListGets player's spawn location.voidsetSpawnLocation(@NotNull Location location) Sets player's spawn location.Methods inherited from class org.bukkit.event.player.PlayerEventgetPlayerMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
PlayerSpawnLocationEvent
 
- 
- 
Method Details- 
getSpawnLocationGets player's spawn location. If the playerOfflinePlayer.hasPlayedBefore(), it's going to default to the location inside player.dat file. For new players, the default spawn location is spawn of the main Bukkit world.- Returns:
- the spawn location
 
- 
setSpawnLocationSets player's spawn location.- Parameters:
- location- the spawn location
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-