public class RegionManagerCommandsManager
extends java.lang.Object
implements org.bukkit.command.CommandExecutor
| Modifier and Type | Class and Description |
|---|---|
static class |
RegionManagerCommandsManager.ConfigProperties
RegionManagerCommandsManager.ConfigProperties contains all paths of RegionManager's configuration and regions file. |
static class |
RegionManagerCommandsManager.MessageProperties
RegionManagerCommandsManager.MessageProperties contains all message-related stuff for RegionManager
|
static class |
RegionManagerCommandsManager.Properties
RegionManagerCommandsManager.Properties is a static class containing the main aspects for using RegionManager. |
static class |
RegionManagerCommandsManager.RegionProperties
RegionManagerCommandsManager.RegionProperties contains essential methods for using RegionManager's regions. |
| Modifier and Type | Field and Description |
|---|---|
private org.bukkit.configuration.file.YamlConfiguration |
config
The
YamlConfiguration instance that is used for storing and reading the basic settings. |
private net.milkbowl.vault.economy.Economy |
economy
The
Economy instance that is used. |
private RegionManagerPlugin |
plugin
The
RegionManagerPlugin instance that is used. |
private org.bukkit.configuration.file.YamlConfiguration |
regions
The
YamlConfiguration instance that is used for storing and reading information about regions. |
private RegionManagerGeneralCommands |
rmgc
The
RegionManagerGeneralCommands instance that is used for executing general commands (commands that can be executed by both players and console). |
private RegionManagerPlayerCommands |
rmpc
The
RegionManagerPlayerCommands instance that is used for executing player commands (commands that can be executed by players only). |
| Constructor and Description |
|---|
RegionManagerCommandsManager(RegionManagerPlugin plugin)
Creates a new instance of
RegionManagerCommandsManager with the parent RegionManagerPlugin specified. |
| Modifier and Type | Method and Description |
|---|---|
org.bukkit.configuration.file.YamlConfiguration |
getConfig()
Returns the configuration of RegionManager.
|
net.milkbowl.vault.economy.Economy |
getEconomy()
Returns the economy plugin RegionManager is using.
|
RegionManagerPlugin |
getPlugin()
Returns the plugin this RegionManagerCommandsManager is using.
|
org.bukkit.configuration.file.YamlConfiguration |
getRegions()
Returns the regions file of RegionManager as a
YamlConfiguration |
org.bukkit.World |
getWorld(java.lang.String regionname)
Determines the world of a given region's name.
|
private void |
initConfig()
(Re-)Initializes RegionManagerCommandsManager's
config attribute. |
private void |
initEconomy()
(Re-)Initializes RegionManagerCommandsManager's
economy attribute. |
private void |
initRegions()
(Re-)Initializes RegionManagerCommandsManager's
regions attribute. |
boolean |
onCommand(org.bukkit.command.CommandSender sender,
org.bukkit.command.Command command,
java.lang.String label,
java.lang.String[] args) |
boolean |
regionExists(java.lang.String regionname,
org.bukkit.World world)
Returns whether a region exists or not.
|
void |
reload()
Reloads all RegionManager files and re-initializes the Economy plugin.
|
void |
reloadConfig()
Reloads the RegionManager configuration.
|
void |
reloadRegions()
Reloads the RegionManager regions file.
|
void |
save()
Saves all files of RegionManager.
|
void |
saveConfig()
Saves the configuration of RegionManager.
|
void |
saveRegions()
Saves the regions file of RegionManager.
|
private RegionManagerPlugin plugin
RegionManagerPlugin instance that is used.private net.milkbowl.vault.economy.Economy economy
Economy instance that is used.Economyprivate org.bukkit.configuration.file.YamlConfiguration config
YamlConfiguration instance that is used for storing and reading the basic settings.YamlConfigurationprivate org.bukkit.configuration.file.YamlConfiguration regions
YamlConfiguration instance that is used for storing and reading information about regions.YamlConfigurationprivate RegionManagerGeneralCommands rmgc
RegionManagerGeneralCommands instance that is used for executing general commands (commands that can be executed by both players and console).private RegionManagerPlayerCommands rmpc
RegionManagerPlayerCommands instance that is used for executing player commands (commands that can be executed by players only).public RegionManagerCommandsManager(RegionManagerPlugin plugin)
RegionManagerCommandsManager with the parent RegionManagerPlugin specified.plugin - the RegionManagerPlugin that shall be usedpublic boolean onCommand(org.bukkit.command.CommandSender sender,
org.bukkit.command.Command command,
java.lang.String label,
java.lang.String[] args)
onCommand in interface org.bukkit.command.CommandExecutorpublic RegionManagerPlugin getPlugin()
public net.milkbowl.vault.economy.Economy getEconomy()
null if no economy plugin was found, the Economy instance if foundpublic org.bukkit.configuration.file.YamlConfiguration getConfig()
public org.bukkit.configuration.file.YamlConfiguration getRegions()
YamlConfigurationpublic org.bukkit.World getWorld(java.lang.String regionname)
throws RegionManagerGeneralCommands.RegionFormatException
<worldname>_<chunk x>_<chunk z>) a RegionFormatException is thrown.regionname - the name of the regionRegionManagerGeneralCommands.RegionFormatException - if the region is not fulfilling the region format.RegionPropertiespublic void save()
saveConfig(),
saveRegions()public void saveConfig()
public void saveRegions()
public boolean regionExists(java.lang.String regionname,
org.bukkit.World world)
regionname - the region's nameworld - the region's worldtrue if the region is found both in RegionManager's regions file and the WorldGuard's one, false if notpublic void reload()
reloadConfig(),
reloadRegions(),
initEconomy()public void reloadConfig()
public void reloadRegions()
private void initEconomy()
economy attribute.private void initConfig()
config attribute.private void initRegions()
regions attribute.