Package nl.minetopiasdb.api.mtplaces
Class MTWorldManager
java.lang.Object
nl.minetopiasdb.api.mtplaces.MTWorldManager
Class used to retrieve and manage MTWorlds.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionEnable a world as aMTWorld
static MTWorldManager
Get an instance of the MTWorldManagergetMTWorld
(String worldName) Get theMTWorld
object for the provided worldGet a collection ofMTWorld
sGet a collection containing the lowercase names of all worlds where MinetopiaSDB is active invoid
initWorlds
(boolean force) Fill theMTWorld
cache if it hasn't been filled already (never necessary to do manually)boolean
isSDBEnabled
(String worldName) Check if Minetopia is active in the current worldboolean
isSDBEnabled
(org.bukkit.World world) Check if Minetopia is active in the current worldremoveWorld
(String world) Disable MinetopiaSDB in the provided world
-
Constructor Details
-
MTWorldManager
public MTWorldManager()
-
-
Method Details
-
getInstance
Get an instance of the MTWorldManager- Returns:
- instance of MTWorldManager
-
addWorld
Enable a world as aMTWorld
- Parameters:
worldName
- name of the world- Returns:
- true if world creation was a success
-
removeWorld
Disable MinetopiaSDB in the provided world- Parameters:
world
- the world where MinetopiaSDB should be disabled- Returns:
- true if MinetopiaSDB has been disabled successfully
-
getMTWorlds
Get a collection ofMTWorld
s- Returns:
- collection containing all
MTWorld
objects
-
getWorldNames
Get a collection containing the lowercase names of all worlds where MinetopiaSDB is active in- Returns:
- collection containing the lowercase name of all
MTWorld
s
-
isSDBEnabled
public boolean isSDBEnabled(org.bukkit.World world) Check if Minetopia is active in the current world- Parameters:
world
- world object- Returns:
- true if SDB is enabled in this world
-
isSDBEnabled
Check if Minetopia is active in the current world- Parameters:
worldName
- name of the world- Returns:
- true if SDB is enabled in this world
-
getMTWorld
Get theMTWorld
object for the provided world- Parameters:
worldName
- name of the world- Returns:
MTWorld
object
-
initWorlds
public void initWorlds(boolean force) Fill theMTWorld
cache if it hasn't been filled already (never necessary to do manually)- Parameters:
force
- if force is true, theMTWorld
cache gets reinitialised
-