Package nl.minetopiasdb.api.mtplaces
Class MTWorldManager
java.lang.Object
nl.minetopiasdb.api.mtplaces.MTWorldManager
Class used to retrieve and manage MTWorlds.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEnable a world as aMTWorldstatic MTWorldManagerGet an instance of the MTWorldManagergetMTWorld(String worldName) Get theMTWorldobject for the provided worldGet a collection ofMTWorldsGet a collection containing the lowercase names of all worlds where MinetopiaSDB is active invoidinitWorlds(boolean force) Fill theMTWorldcache if it hasn't been filled already (never necessary to do manually)booleanisSDBEnabled(String worldName) Check if Minetopia is active in the current worldbooleanisSDBEnabled(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 ofMTWorlds- Returns:
- collection containing all
MTWorldobjects
-
getWorldNames
Get a collection containing the lowercase names of all worlds where MinetopiaSDB is active in- Returns:
- collection containing the lowercase name of all
MTWorlds
-
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 theMTWorldobject for the provided world- Parameters:
worldName- name of the world- Returns:
MTWorldobject
-
initWorlds
public void initWorlds(boolean force) Fill theMTWorldcache if it hasn't been filled already (never necessary to do manually)- Parameters:
force- if force is true, theMTWorldcache gets reinitialised
-