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 Classes
    Modifier and Type
    Class
    Description
    class 
    Subcommands for managing exit offers.
  • Constructor Summary

    Constructors
    Constructor
    Description
    The RealEstate plugin instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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
    list(org.bukkit.command.CommandSender sender, String type, int page)
    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
    renewRent(org.bukkit.entity.Player player, String newStatus)
    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

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static void list(org.bukkit.command.CommandSender sender, String type, int page)
      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

      public static void renewRent(org.bukkit.entity.Player player, String newStatus)
      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 command
      newStatus - 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 bid
      bid - 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 help
      help - the CommandHelp object containing the help details