Package net.lapismc.lapiscore.utils
Class LocationUtils
- java.lang.Object
-
- net.lapismc.lapiscore.utils.LocationUtils
-
public class LocationUtils extends java.lang.ObjectA util for parsing Location objects to and from String objects Primarily used for storing locations in configs
-
-
Constructor Summary
Constructors Constructor Description LocationUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringparseLocationToString(org.bukkit.Location loc)Creates a config safe String from a Locationorg.bukkit.LocationparseStringToLocation(java.lang.String s)Creates a Location object from a String
-
-
-
Method Detail
-
parseLocationToString
public java.lang.String parseLocationToString(org.bukkit.Location loc)
Creates a config safe String from a Location- Parameters:
loc- The location you wish to parse- Returns:
- Returns a string that holds all the information of the Location provided
-
parseStringToLocation
public org.bukkit.Location parseStringToLocation(java.lang.String s)
Creates a Location object from a String- Parameters:
s- The String created by theparseLocationToString(Location)method- Returns:
- Returns a Location object, Null if the String is null or "" or if the world doesn't exist
-
-