public static class RegionManagerCommandsManager.RegionProperties
extends java.lang.Object
RegionManagerCommandsManager.RegionProperties contains essential methods for using RegionManager's regions.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONFIG_EXCLUDED
public static final String CONFIG_EXCLUDED = REGIONNAME_PLACEHOLDER + ".excluded";
The path to the YamlConfiguration's entry that shows whether the region is excluded from sale or not. |
static java.lang.String |
CONFIG_MEMBERS
public static final String CONFIG_MEMBERS = REGIONNAME_PLACEHOLDER + ".members";
The path to the YamlConfiguration's entry for a region's members. |
static java.lang.String |
CONFIG_OWNERS
public static final String CONFIG_OWNERS = REGIONNAME_PLACEHOLDER + ".owners";
The path to the YamlConfiguration's entry for a region's owners. |
static java.lang.String |
CONFIG_PRICE
public static final String CONFIG_PRICE = REGIONNAME_PLACEHOLDER + ".price";
The path to the YamlConfiguration's entry for a region's price. |
static java.lang.String |
CONFIG_SELLER
public static final String CONFIG_SELLER = REGIONNAME_PLACEHOLDER + ".seller";
The path to the YamlConfiguration's entry for a region's vendor. |
static java.lang.String |
REGIONNAME_PLACEHOLDER
public static final String REGIONNAME_PLACEHOLDER = "<region>";
The placeholder for a region's name. |
static java.lang.String |
REGIONNAME_SEPARATOR
public static final String REGIONNAME_SEPARATOR = "_";
The separator of a region's name regarding world, x coordinate of the region's chunk and the z coordinate of the region's chunk. |
| Constructor and Description |
|---|
RegionManagerCommandsManager.RegionProperties() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addMember(org.bukkit.configuration.file.YamlConfiguration regions,
com.sk89q.worldguard.protection.managers.RegionManager rm,
java.lang.String regionname,
java.lang.String... players)
Adds a member/members to a region.
|
static void |
addNewRegion(org.bukkit.configuration.file.YamlConfiguration config,
org.bukkit.configuration.file.YamlConfiguration regions,
java.lang.String regionname)
Adds a new region to RegionManager's regions list.
|
static void |
addOwner(org.bukkit.configuration.file.YamlConfiguration regions,
com.sk89q.worldguard.protection.managers.RegionManager rm,
java.lang.String regionname,
java.lang.String... players)
Adds an owner/owners to a region.
|
static void |
buy(org.bukkit.Server server,
com.sk89q.worldguard.bukkit.WorldGuardPlugin worldguard,
org.bukkit.configuration.file.YamlConfiguration config,
org.bukkit.configuration.file.YamlConfiguration regions,
net.milkbowl.vault.economy.Economy economy,
com.sk89q.worldguard.protection.managers.RegionManager rm,
java.lang.String regionname,
org.bukkit.entity.Player player)
Makes a player buy a region.
|
static void |
clear(org.bukkit.command.CommandSender sender,
org.bukkit.Server server,
org.bukkit.configuration.file.YamlConfiguration config,
org.bukkit.configuration.file.YamlConfiguration regions,
com.sk89q.worldguard.protection.managers.RegionManager rm,
java.lang.String regionname)
Reinitializes a region.
|
static void |
exclude(org.bukkit.configuration.file.YamlConfiguration regions,
com.sk89q.worldguard.protection.managers.RegionManager rm,
java.lang.String regionname)
Excludes a region from sale and resets all members and owners.
|
static java.lang.String |
getExcludedField(java.lang.String regionname)
Returns the path for a region's excluded state.
|
static java.lang.String |
getMembersField(java.lang.String regionname)
Returns the path for a region's members.
|
static java.lang.String |
getOwnersField(java.lang.String regionname)
Returns the path for a region's owners.
|
static java.lang.String |
getPriceField(java.lang.String regionname)
Returns the path for a region's price.
|
static java.lang.String |
getRegionName(org.bukkit.Chunk chunk)
Returns the name of a region specified by the given chunk.
|
static java.lang.String |
getSellerField(java.lang.String regionname)
Returns the path for a region's seller.
|
static void |
include(org.bukkit.configuration.file.YamlConfiguration config,
org.bukkit.configuration.file.YamlConfiguration regions,
java.lang.String regionname)
Includes a region to sale and sets the region's price to the default price specified in the given configuration.
|
static void |
remove(org.bukkit.configuration.file.YamlConfiguration regions,
com.sk89q.worldguard.protection.managers.RegionManager rm,
java.lang.String regionname,
java.lang.String... players)
Removes a player/players from a region.
|
static void |
sell(org.bukkit.Server server,
org.bukkit.configuration.file.YamlConfiguration regions,
java.lang.String regionname,
org.bukkit.entity.Player player,
double price)
Makes a player sell a region.
|
public static final java.lang.String REGIONNAME_PLACEHOLDER
public static final String REGIONNAME_PLACEHOLDER = "<region>";
public static final java.lang.String REGIONNAME_SEPARATOR
public static final String REGIONNAME_SEPARATOR = "_";
public static final java.lang.String CONFIG_EXCLUDED
public static final String CONFIG_EXCLUDED = REGIONNAME_PLACEHOLDER + ".excluded";
YamlConfiguration's entry that shows whether the region is excluded from sale or not.REGIONNAME_PLACEHOLDER,
Constant Field Valuespublic static final java.lang.String CONFIG_SELLER
public static final String CONFIG_SELLER = REGIONNAME_PLACEHOLDER + ".seller";
YamlConfiguration's entry for a region's vendor.REGIONNAME_PLACEHOLDER,
Constant Field Valuespublic static final java.lang.String CONFIG_PRICE
public static final String CONFIG_PRICE = REGIONNAME_PLACEHOLDER + ".price";
YamlConfiguration's entry for a region's price. The value is set to a negative amount if the region is not for sale.REGIONNAME_PLACEHOLDER,
Constant Field Valuespublic static final java.lang.String CONFIG_OWNERS
public static final String CONFIG_OWNERS = REGIONNAME_PLACEHOLDER + ".owners";
YamlConfiguration's entry for a region's owners.public static final java.lang.String CONFIG_MEMBERS
public static final String CONFIG_MEMBERS = REGIONNAME_PLACEHOLDER + ".members";
YamlConfiguration's entry for a region's members.public RegionManagerCommandsManager.RegionProperties()
public static final java.lang.String getExcludedField(java.lang.String regionname)
regionname - the region's namepublic static final java.lang.String getSellerField(java.lang.String regionname)
regionname - the region's namepublic static final java.lang.String getPriceField(java.lang.String regionname)
regionname - the region's namepublic static final java.lang.String getOwnersField(java.lang.String regionname)
regionname - the region's namepublic static final java.lang.String getMembersField(java.lang.String regionname)
regionname - the region's namepublic static final java.lang.String getRegionName(org.bukkit.Chunk chunk)
chunk - the chunkpublic static final void addNewRegion(org.bukkit.configuration.file.YamlConfiguration config,
org.bukkit.configuration.file.YamlConfiguration regions,
java.lang.String regionname)
<region's name>:
excluded: <boolean>
seller: <String>
price: <double>
owners: <List<String>>
members: <List<String>>config - the configuration. Please use either RegionManagerCommandsManager's getConfig() or
YamlConfiguration.load(ConfigProperties.CONFIG_FILE).regions - the regions file. Please use either RegionManagerCommandsManager's getRegions() or
YamlConfiguration.load(ConfigProperites.REGIONS_FILE).regionname - the region's namepublic static final void addMember(org.bukkit.configuration.file.YamlConfiguration regions,
com.sk89q.worldguard.protection.managers.RegionManager rm,
java.lang.String regionname,
java.lang.String... players)
regions - the regions file. Please use either RegionManagerCommandsManager's getRegions() or
YamlConfiguration.load(ConfigProperites.REGIONS_FILE).rm - the RegionManager instance (WorldGuard RegionManager) of the region's world.regionname - the region's nameplayers - the name(s) of the player(s)RegionManagerpublic static final void addOwner(org.bukkit.configuration.file.YamlConfiguration regions,
com.sk89q.worldguard.protection.managers.RegionManager rm,
java.lang.String regionname,
java.lang.String... players)
regions - the regions file. Please use either RegionManagerCommandsManager's getRegions() or
YamlConfiguration.load(ConfigProperites.REGIONS_FILE).rm - the RegionManager instance (WorldGuard RegionManager) of the region's world.regionname - the region's nameplayers - the name(s) of the player(s)RegionManagerpublic static final void clear(org.bukkit.command.CommandSender sender,
org.bukkit.Server server,
org.bukkit.configuration.file.YamlConfiguration config,
org.bukkit.configuration.file.YamlConfiguration regions,
com.sk89q.worldguard.protection.managers.RegionManager rm,
java.lang.String regionname)
config
configuration.sender - the senderserver - the server of the RegionManager plugin. Please use RegionManagerCommandsManager.getPlugin().getServer().config - the configuration. Please use either RegionManagerCommandsManager's getConfig() or
YamlConfiguration.load(ConfigProperties.CONFIG_FILE).regions - the regions file. Please use either RegionManagerCommandsManager's getRegions() or
YamlConfiguration.load(ConfigProperites.REGIONS_FILE).rm - the RegionManager instance (WorldGuard RegionManager) of the region's world.regionname - the region's nameRegionManagerCommandsManager.Properties.setDefaultFlags(ProtectedRegion),
RegionManagerpublic static final void remove(org.bukkit.configuration.file.YamlConfiguration regions,
com.sk89q.worldguard.protection.managers.RegionManager rm,
java.lang.String regionname,
java.lang.String... players)
regions - the regions file. Please use either RegionManagerCommandsManager's getRegions() or
YamlConfiguration.load(ConfigProperites.REGIONS_FILE).rm - the RegionManager instance (WorldGuard RegionManager) of the region's world.regionname - the region's nameplayers - the name(s) of the player(s)RegionManagerpublic static final void exclude(org.bukkit.configuration.file.YamlConfiguration regions,
com.sk89q.worldguard.protection.managers.RegionManager rm,
java.lang.String regionname)
regions - the regions file. Please use either RegionManagerCommandsManager's getRegions() or
YamlConfiguration.load(ConfigProperites.REGIONS_FILE).rm - the RegionManager instance (WorldGuard RegionManager) of the region's world.regionname - the region's nameRegionManagerpublic static final void include(org.bukkit.configuration.file.YamlConfiguration config,
org.bukkit.configuration.file.YamlConfiguration regions,
java.lang.String regionname)
config - the configuration. Please use either RegionManagerCommandsManager's getConfig() or
YamlConfiguration.load(ConfigProperties.CONFIG_FILE).regions - the regions file. Please use either RegionManagerCommandsManager's getRegions() or
YamlConfiguration.load(ConfigProperites.REGIONS_FILE).regionname - the region's namepublic static final void buy(org.bukkit.Server server,
com.sk89q.worldguard.bukkit.WorldGuardPlugin worldguard,
org.bukkit.configuration.file.YamlConfiguration config,
org.bukkit.configuration.file.YamlConfiguration regions,
net.milkbowl.vault.economy.Economy economy,
com.sk89q.worldguard.protection.managers.RegionManager rm,
java.lang.String regionname,
org.bukkit.entity.Player player)
server - the server of the RegionManager plugin. Please use RegionManagerCommandsManager.getPlugin().getServer().worldguard - the WorldGuardPlugin instance the server is using. Either use RegionManagerPlugin's getWorldGuard().config - the configuration. Please use either RegionManagerCommandsManager's getConfig() or
YamlConfiguration.load(ConfigProperties.CONFIG_FILE).regions - the regions file. Please use either RegionManagerCommandsManager's getRegions() or
YamlConfiguration.load(ConfigProperites.REGIONS_FILE).economy - the economy plugin used. Please use RegionManagerCommandsManager's getEconomy().rm - the RegionManager instance (WorldGuard RegionManager) of the region's world.regionname - the region's nameplayer - the Player instance of the player that buys the regionEconomy,
RegionManagerpublic static final void sell(org.bukkit.Server server,
org.bukkit.configuration.file.YamlConfiguration regions,
java.lang.String regionname,
org.bukkit.entity.Player player,
double price)
server - the server of the RegionManager plugin. Please use RegionManagerCommandsManager.getPlugin().getServer().regions - the regions file. Please use either RegionManagerCommandsManager's getRegions() or
YamlConfiguration.load(ConfigProperites.REGIONS_FILE).regionname - the region's nameplayer - the Player instance of the player that sells the regionprice - the price of that region