Class RECommand
java.lang.Object
co.aikar.commands.BaseCommand
me.EtienneDx.RealEstate.RECommand
public class RECommand
extends co.aikar.commands.BaseCommand
The RECommand class provides command handlers for the RealEstate plugin.
It includes subcommands for retrieving claim information, listing transactions, renewing rent, bidding on auctioned claims, cancelling transactions, and managing exit offers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Subcommands for managing exit offers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
bid
(org.bukkit.entity.Player player, double bid) Bids on an auctioned claim.static void
cancelTransaction
(org.bukkit.entity.Player player) Cancels the transaction for the claim at the player's location.static void
info
(org.bukkit.entity.Player player) Displays information about the claim that the player is standing in.static void
Lists all RealEstate offers (sell, rent, or lease) currently existing.static void
onHelp
(org.bukkit.command.CommandSender sender, co.aikar.commands.CommandHelp help) Displays the help information for the RealEstate commands.static void
Allows a player to view or change the automatic renew status of a rent transaction.Methods inherited from class co.aikar.commands.BaseCommand
canExecute, doHelp, doHelp, getCommandHelp, getContextFlags, getCurrentCommandIssuer, getCurrentCommandManager, getDefaultRegisteredCommand, getExceptionHandler, getExecCommandLabel, getExecSubcommand, getLastCommandOperationContext, getName, getOrigArgs, getRegisteredCommands, getRequiredPermissions, hasPermission, hasPermission, help, help, requiresPermission, setContextFlags, setExceptionHandler, showCommandHelp, showSyntax, tabComplete, tabComplete
-
Constructor Details
-
RECommand
public RECommand()The RealEstate plugin instance.This is the base instance for the commands for the RealEstate plugin.
-
-
Method Details
-
info
public static void info(org.bukkit.entity.Player player) Displays information about the claim that the player is standing in.If there is an ongoing transaction for the claim, its details are shown; otherwise, a "no transaction found" message is sent.
- Parameters:
player
- the player executing the command
-
list
Lists all RealEstate offers (sell, rent, or lease) currently existing.The type can be specified ("all", "sell", "rent", or "lease") and a page number.
- Parameters:
sender
- the command sender (player or console)type
- the type of offers to list (optional; defaults to "all")page
- the page number to display (optional; defaults to 1)
-
renewRent
Allows a player to view or change the automatic renew status of a rent transaction.Without a parameter, the current status is displayed; with a parameter ("enable" or "disable"), the status is updated.
- Parameters:
player
- the player executing the commandnewStatus
- the new status ("enable" or "disable"); optional
-
bid
public static void bid(org.bukkit.entity.Player player, double bid) Bids on an auctioned claim.This command requires the claim to be currently under auction.
- Parameters:
player
- the player placing the bidbid
- the bid amount (must be a positive double)
-
cancelTransaction
public static void cancelTransaction(org.bukkit.entity.Player player) Cancels the transaction for the claim at the player's location.Requires the player to have the "realestate.admin" permission.
- Parameters:
player
- the player executing the cancellation command
-
onHelp
public static void onHelp(org.bukkit.command.CommandSender sender, co.aikar.commands.CommandHelp help) Displays the help information for the RealEstate commands.- Parameters:
sender
- the command sender requesting helphelp
- the CommandHelp object containing the help details
-