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