public class PlayerSpawnLocationEvent extends PlayerEvent
Event.Result
player
Constructor | Description |
---|---|
PlayerSpawnLocationEvent(Player who,
Location spawnLocation) |
Modifier and Type | Method | Description |
---|---|---|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
Location |
getSpawnLocation() |
Gets player's spawn location.
|
void |
setSpawnLocation(Location location) |
Sets player's spawn location.
|
getEventName, isAsynchronous
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPlayer
@NotNull public Location getSpawnLocation()
OfflinePlayer.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.public void setSpawnLocation(@NotNull Location location)
location
- the spawn location@NotNull public HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
Copyright © 2019. All rights reserved.