public class RegionManagerPlayerCommands
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private RegionManagerCommandsManager |
commands
The
RegionManagerCommandsManager instance that is used. |
private static java.lang.String |
MESSAGE_PREFIX
private static final String MESSAGE_PREFIX = MessageProperties.MESSAGE_PREFIX; |
private RegionManagerPlugin |
plugin
The
RegionManagerPlugin instance that is used. |
| Constructor and Description |
|---|
RegionManagerPlayerCommands(RegionManagerPlugin plugin,
RegionManagerCommandsManager commands)
Creates a new instance of
RegionManagerPlayerCommands with the RegionManagerPlugin and RegionManagerCommandsManager specified. |
| Modifier and Type | Method and Description |
|---|---|
void |
buy(org.bukkit.entity.Player sender,
java.lang.String regionname)
Buys a region.
|
void |
lock(org.bukkit.entity.Player sender,
java.lang.String regionname)
Locks a region.
|
boolean |
playerCommand(org.bukkit.entity.Player sender,
java.lang.String[] args)
Computes a player's command.
|
void |
sell(org.bukkit.entity.Player sender,
java.lang.String regionname,
double price)
Sells a region.
|
void |
unlock(org.bukkit.entity.Player sender,
java.lang.String regionname)
Unlocks a region.
|
private RegionManagerPlugin plugin
RegionManagerPlugin instance that is used.private RegionManagerCommandsManager commands
RegionManagerCommandsManager instance that is used.private static final java.lang.String MESSAGE_PREFIX
private static final String MESSAGE_PREFIX = MessageProperties.MESSAGE_PREFIX;public RegionManagerPlayerCommands(RegionManagerPlugin plugin, RegionManagerCommandsManager commands)
RegionManagerPlayerCommands with the RegionManagerPlugin and RegionManagerCommandsManager specified.plugin - the plugincommands - the RegionManagerCommandsManager instancepublic boolean playerCommand(org.bukkit.entity.Player sender,
java.lang.String[] args)
sender - the senderargs - the argumentstrue if the command was recognized, false if not.public void buy(org.bukkit.entity.Player sender,
java.lang.String regionname)
sender - the sender (who is going to buy the region)regionname - the region's namepublic void sell(org.bukkit.entity.Player sender,
java.lang.String regionname,
double price)
sender - the sender (who is going to sell the region)regionname - the region's nameprice - the region's price. If a negative amount was specified, this method will use the default region price from RegionManager's configuration.public void lock(org.bukkit.entity.Player sender,
java.lang.String regionname)
sender - the senderregionname - the region's namepublic void unlock(org.bukkit.entity.Player sender,
java.lang.String regionname)
sender - the senderregionname - the region's name