Interface LocationManager<T>

All Known Implementing Classes:
FlatFileLocationsManager

public interface LocationManager<T>
  • Method Summary

    Modifier and Type Method Description
    void castWorld​(org.bukkit.World world)
    Set this manager to be for one world only.
    T create​(java.lang.String id, org.bukkit.Location loc, org.bukkit.entity.Player player)
    Create a location.
    T get​(java.lang.String id)
    Get by name.
    java.util.List<T> getLocations()
    Gets all the locations that this location manager has.
    void load()
    Load from file.
    boolean remove​(java.lang.String id)
    Removes a location.
    void save()
    Save to file.
    void updateWorlds()
    Updates warps from unloaded worlds.
  • Method Details

    • castWorld

      void castWorld​(org.bukkit.World world)
      Set this manager to be for one world only.
      Parameters:
      world - The world to use
    • load

      void load() throws java.io.IOException
      Load from file.
      Throws:
      java.io.IOException - when an error occurs during IO
    • save

      void save() throws java.io.IOException
      Save to file.
      Throws:
      java.io.IOException - when an error occurs during IO
    • get

      T get​(java.lang.String id)
      Get by name.
      Parameters:
      id - The name to get
      Returns:
      The LocationManager if registered
    • updateWorlds

      void updateWorlds()
      Updates warps from unloaded worlds.
    • create

      T create​(java.lang.String id, org.bukkit.Location loc, org.bukkit.entity.Player player)
      Create a location.
      Parameters:
      id - The name of the location
      loc - The location
      player - The player to own the location
      Returns:
      The created location
    • remove

      boolean remove​(java.lang.String id)
      Removes a location.
      Parameters:
      id - The id to remove
      Returns:
      whether it was removed
    • getLocations

      java.util.List<T> getLocations()
      Gets all the locations that this location manager has.
      Returns:
      This location manager's locations.