Class LocationUtils


  • public class LocationUtils
    extends java.lang.Object
    A 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.String parseLocationToString​(org.bukkit.Location loc)
      Creates a config safe String from a Location
      org.bukkit.Location parseStringToLocation​(java.lang.String s)
      Creates a Location object from a String
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LocationUtils

        public LocationUtils()
    • 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 the parseLocationToString(Location) method
        Returns:
        Returns a Location object, Null if the String is null or "" or if the world doesn't exist