Class TeleporterManager

java.lang.Object
nl.minetopiasdb.api.TeleporterManager

public class TeleporterManager extends Object
Class to manage teleporters
  • Constructor Details

    • TeleporterManager

      public TeleporterManager()
  • Method Details

    • getInstance

      public static TeleporterManager getInstance()
      Get an instance of Teleporters class
      Returns:
      instance
    • setTeleporterLocation

      public void setTeleporterLocation(UUID uuid, org.bukkit.Location location)
      Set the teleporter location (used by /teleporter setposition)
      Parameters:
      uuid - UUID of player
      location - teleporter spawn location
    • getTeleporterLocation

      public org.bukkit.Location getTeleporterLocation(UUID uuid)
      Get the teleporter location set with /teleporter setposition by a player
      Parameters:
      uuid - UUID of player
      Returns:
      location
    • create

      public void create(org.bukkit.Location signLoc, org.bukkit.Location goalLoc, double costs, int minLevel)
      Create a teleporter with a given costs, sign location and goal location Please call me async
      Parameters:
      signLoc - sign location
      goalLoc - goal location
      costs - costs for using this teleporter.
      minLevel - minimal level to use this teleporter
    • delete

      public void delete(org.bukkit.Location signLoc)
      Delete a teleporter at given sign location. Please call me async
      Parameters:
      signLoc - required sign location
    • getTeleporters

      public List<Teleporter> getTeleporters()
      Get a list of teleporters
      Returns:
      list of teleporters
    • pullData

      public void pullData()
      Pull the data from the database (isn't necessary, getTeleporters() does this automatically when the cache is empty
    • getTeleporter

      public Teleporter getTeleporter(org.bukkit.Location signLoc)
      Get teleporter at given sign location. Will return null when none exists.
      Parameters:
      signLoc - Location of the sign
      Returns:
      Teleporter instance, or null when none found.