public final class RespawnLocation extends Object implements DataSerializable
RespawnLocationData or by using the
builder().| Modifier and Type | Class and Description |
|---|---|
static class |
RespawnLocation.Builder
A helper class to build
RespawnLocations. |
| Modifier and Type | Method and Description |
|---|---|
Optional<Location<World>> |
asLocation()
Gets this spawn position as a
Location object, if the world is
available. |
static RespawnLocation.Builder |
builder()
Creates a new
RespawnLocation.Builder to build a RespawnLocation. |
boolean |
equals(Object o) |
int |
getContentVersion()
Gets the content version of this
DataSerializable. |
com.flowpowered.math.vector.Vector3d |
getPosition()
Gets the position within the world of this spawn point.
|
UUID |
getWorldUniqueId()
Gets the
UUID of the world this position refers to. |
int |
hashCode() |
boolean |
isForced()
Gets whether the spawn position is forced in the given world, if
available.
|
DataContainer |
toContainer()
Serializes this object into a comprehensible
DataContainer. |
String |
toString() |
public static RespawnLocation.Builder builder()
RespawnLocation.Builder to build a RespawnLocation.public UUID getWorldUniqueId()
UUID of the world this position refers to.public com.flowpowered.math.vector.Vector3d getPosition()
public boolean isForced()
public Optional<Location<World>> asLocation()
Location object, if the world is
available.public int getContentVersion()
DataSerializableDataSerializable. The version
may differ between instances of plugins and implementations such that
the DataView from DataSerializable.toContainer() may include different
information, or remove other information as they are no longer deemed
necessary. The version goes hand in hand with DataContentUpdater
as it is required when there exists any DataView of this
DataSerializable with an "older" version.getContentVersion in interface DataSerializablepublic DataContainer toContainer()
DataSerializableDataContainer.toContainer in interface DataSerializable