Class Warps

java.lang.Object
com.earth2me.essentials.Warps
All Implemented Interfaces:
IWarps, IConf, IWarps

public class Warps extends Object implements IConf, IWarps
  • Constructor Details

    • Warps

      public Warps(File dataFolder)
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Description copied from interface: IWarps
      Check to see if the file is empty
      Specified by:
      isEmpty in interface IWarps
      Returns:
      Whether or not the file is empty
    • isWarp

      public boolean isWarp(String name)
      Description copied from interface: IWarps
      Checks if the provided name is a warp.
      Specified by:
      isWarp in interface IWarps
      Parameters:
      name - The warp name.
      Returns:
      true if a warp by that name exists.
    • getList

      public Collection<String> getList()
      Description copied from interface: IWarps
      Gets a list of warps
      Specified by:
      getList in interface IWarps
      Returns:
      - A Collection of warps
    • getWarp

      public Location getWarp(String warp) throws WarpNotFoundException
      Description copied from interface: IWarps
      Get a warp by name
      Specified by:
      getWarp in interface IWarps
      Parameters:
      warp - - Warp name
      Returns:
      - Location the warp is set to
      Throws:
      WarpNotFoundException - When the warp is not found
    • setWarp

      public void setWarp(String name, Location loc) throws Exception
      Description copied from interface: IWarps
      Set a warp
      Specified by:
      setWarp in interface IWarps
      Parameters:
      name - - Name of warp
      loc - - Location of warp
      Throws:
      Exception - If the warp could not be set
    • setWarp

      public void setWarp(IUser user, String name, Location loc) throws Exception
      Description copied from interface: IWarps
      Set a warp
      Specified by:
      setWarp in interface IWarps
      Parameters:
      user - - User of warp
      name - - Name of warp
      loc - - Location of warp
      Throws:
      Exception - If the warp could not be set
    • getLastOwner

      public UUID getLastOwner(String warp) throws WarpNotFoundException
      Description copied from interface: IWarps
      Gets Lastowner UUID
      Specified by:
      getLastOwner in interface IWarps
      Parameters:
      warp - - Name of warp
      Throws:
      WarpNotFoundException - If the warp is not found
    • removeWarp

      public void removeWarp(String name) throws Exception
      Description copied from interface: IWarps
      Delete a warp from the warp DB
      Specified by:
      removeWarp in interface IWarps
      Parameters:
      name - - Name of warp
      Throws:
      Exception - If the warp could not be removed
    • reloadConfig

      public final void reloadConfig()
      Specified by:
      reloadConfig in interface IConf
    • getWarpFile

      @Deprecated public File getWarpFile(String name) throws InvalidNameException
      Deprecated.
      This method relates to the abandoned 3.x storage refactor and is not implemented.
      Specified by:
      getWarpFile in interface IWarps
      Throws:
      InvalidNameException
    • getCount

      public int getCount()
      Description copied from interface: IWarps
      Gets the number of warps
      Specified by:
      getCount in interface IWarps
      Returns:
      the size of the list of warps