public final class LocationUtil extends Object
Location.| Modifier and Type | Method and Description |
|---|---|
static @NotNull org.bukkit.Location |
centeredIn(@NotNull org.bukkit.Location location)
calculates the center of the given location.
|
static @NotNull org.bukkit.Location |
centeredOn(@NotNull org.bukkit.Location location)
calculates the center bottom of the given location.
|
static @NotNull Optional<org.bukkit.Location> |
fromKey(@NotNull String key)
converts the given key into a
Location. |
static @NotNull String |
toKey(@NotNull org.bukkit.Location location)
converts the given location into a
String. |
static @NotNull org.bukkit.World |
validWorld(@NotNull org.bukkit.Location location)
gets the world of the given location.
|
@NotNull
public static @NotNull org.bukkit.Location centeredOn(@NotNull
@NotNull org.bukkit.Location location)
location - the location to calculate.@NotNull
public static @NotNull org.bukkit.Location centeredIn(@NotNull
@NotNull org.bukkit.Location location)
location - the location to calculate.@NotNull
public static @NotNull org.bukkit.World validWorld(@NotNull
@NotNull org.bukkit.Location location)
location - the location to get.IllegalStateException - if the given location has not a world.@NotNull public static @NotNull Optional<org.bukkit.Location> fromKey(@NotNull @NotNull String key)
Location.key - the key to convert.Location instance.Copyright © 2021. All rights reserved.