Package nl.minetopiasdb.api
Class TeleporterManager
java.lang.Object
nl.minetopiasdb.api.TeleporterManager
Class to manage teleporters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 asyncvoid
delete
(org.bukkit.Location signLoc) Delete a teleporter at given sign location.static TeleporterManager
Get an instance of Teleporters classgetTeleporter
(org.bukkit.Location signLoc) Get teleporter at given sign location.org.bukkit.Location
getTeleporterLocation
(UUID uuid) Get the teleporter location set with /teleporter setposition by a playerGet a list of teleportersvoid
pullData()
Pull the data from the database (isn't necessary,getTeleporters()
does this automatically when the cache is emptyvoid
setTeleporterLocation
(UUID uuid, org.bukkit.Location location) Set the teleporter location (used by /teleporter setposition)
-
Constructor Details
-
TeleporterManager
public TeleporterManager()
-
-
Method Details
-
getInstance
Get an instance of Teleporters class- Returns:
- instance
-
setTeleporterLocation
Set the teleporter location (used by /teleporter setposition)- Parameters:
uuid
- UUID of playerlocation
- teleporter spawn location
-
getTeleporterLocation
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 locationgoalLoc
- goal locationcosts
- 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
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
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.
-