Package nl.minetopiasdb.api.mtplaces
Class MTCityManager
java.lang.Object
nl.minetopiasdb.api.mtplaces.MTCityManager
Class used to retrieve and manage MTCities.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionEnable a WorldGuard region as a MTCityget
(org.bukkit.entity.Player player) Get the first MTCities at the players' current locationgetCities
(org.bukkit.Location location) Get all MTCities at the current locationstatic MTCityManager
Get an instance of the MTCityManagerGet a collection of MTCitiesGet the MTCity object for the provided WorldGuard regionboolean
isSDBEnabled
(String cityName) Check if the provided WorldGuard region is a MTCityremoveCity
(String cityName) Disable MTCity functionality in specified WorldGuard region
-
Constructor Details
-
MTCityManager
public MTCityManager()
-
-
Method Details
-
getInstance
Get an instance of the MTCityManager- Returns:
- instance of MTCityManager
-
addCity
Enable a WorldGuard region as a MTCity- Parameters:
cityName
- name of the WorldGuard region- Returns:
- true if city creation was a success
-
removeCity
Disable MTCity functionality in specified WorldGuard region- Parameters:
cityName
- name of the WorldGuard region- Returns:
- true if city removal was a success
-
getMTCities
Get a collection of MTCities- Returns:
- collection containing all MTCity objects
-
isSDBEnabled
Check if the provided WorldGuard region is a MTCity- Parameters:
cityName
- name of WorldGuard region- Returns:
- true if provided region is a MTCity
-
getMTCity
Get the MTCity object for the provided WorldGuard region- Parameters:
cityName
- name of the WorldGuard region- Returns:
- MTCity object
-
get
Get the first MTCities at the players' current location- Parameters:
player
- player- Returns:
- first MTCity at the players location, or null if none found.
-
getCities
Get all MTCities at the current location- Parameters:
location
- location- Returns:
- a list containing all MTCities at the current location, or an empty list if none are found
-