Package dev.demeng.pluginbase
Class Locations
java.lang.Object
dev.demeng.pluginbase.Locations
Utilities for
Location.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull org.bukkit.Locationcenter(@NotNull org.bukkit.Location loc) Rounds a location to the center of a block.static @NotNull org.bukkit.LocationtoBlockLocation(@NotNull org.bukkit.Location loc) Converts a location to a block location (world and integer coordinates).
-
Constructor Details
-
Locations
public Locations()
-
-
Method Details
-
center
@NotNull public static @NotNull org.bukkit.Location center(@NotNull @NotNull org.bukkit.Location loc) Rounds a location to the center of a block.- Parameters:
loc- The location to center- Returns:
- The centered location
-
toBlockLocation
@NotNull public static @NotNull org.bukkit.Location toBlockLocation(@NotNull @NotNull org.bukkit.Location loc) Converts a location to a block location (world and integer coordinates).- Parameters:
loc- The location to convert to a block location- Returns:
- The block position
-