Interface SpawnLocation
- All Known Implementing Classes:
Government,Nation,Town
public interface SpawnLocation
Provides the spawn location and access to setter for spawn locations.
-
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.LocationgetSpawn()Get the spawn location of this object.default @Nullable org.bukkit.Locationdefault booleanhasSpawn()Checks whether a spawn point exists.voidsetSpawn(@Nullable org.bukkit.Location spawn) Sets the spawn point of this object.
-
Method Details
-
getSpawn
Get the spawn location of this object.- Returns:
- The spawn location
- Throws:
TownyException- If no location is found.
-
hasSpawn
default boolean hasSpawn()Checks whether a spawn point exists.- Returns:
- A boolean indicating if the spawn exists.
-
setSpawn
Sets the spawn point of this object.- Parameters:
spawn- The Location of the new spawn.- Throws:
TownyException- If the spawn could not be set.
-
getSpawnOrNull
@Nullable default @Nullable org.bukkit.Location getSpawnOrNull()
-