Class RealEstate

java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
me.EtienneDx.RealEstate.RealEstate
All Implemented Interfaces:
io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner, org.bukkit.command.CommandExecutor, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor, org.bukkit.plugin.Plugin

public class RealEstate extends org.bukkit.plugin.java.JavaPlugin
The main class for the RealEstate plugin.

This plugin manages claim transactions such as selling, renting, leasing, and auctioning. It integrates with several claim management APIs (GriefPrevention, GriefDefender, WorldGuard, Towny) and external plugins (Vault, Essentials) to provide its functionality.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static IClaimAPI
    The active claim management API implementation.
    The configuration instance for RealEstate.
    static net.milkbowl.vault.economy.Economy
    The economy provider from Vault.
    static com.earth2me.essentials.Essentials
    Essentials plugin instance, if available.
    static RealEstate
    Singleton instance of the RealEstate plugin.
    Logger instance for the plugin.
    The messages instance for customizable messages.
    static net.milkbowl.vault.permission.Permission
    The permission provider from Vault.
    static final String
    The plugin directory path where RealEstate stores its files.
    The transactions store for managing claim transactions.
    static boolean
    Flag indicating if Vault is present.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for the RealEstate plugin.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a log entry to the log file specified in the configuration.
    void
    Called when the plugin is enabled.

    Methods inherited from class org.bukkit.plugin.java.JavaPlugin

    getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getLifecycleManager, getLogger, getPlugin, getPluginLoader, getPluginMeta, getProvidingPlugin, getResource, getServer, init, init, isEnabled, isNaggable, onCommand, onDisable, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString

    Methods inherited from class org.bukkit.plugin.PluginBase

    equals, getName, hashCode

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.bukkit.plugin.Plugin

    getComponentLogger, getDataPath, getLog4JLogger, getSLF4JLogger
  • Field Details

    • log

      public Logger log
      Logger instance for the plugin.
    • config

      public Config config
      The configuration instance for RealEstate.
    • messages

      public Messages messages
      The messages instance for customizable messages.
    • pluginDirPath

      public static final String pluginDirPath
      The plugin directory path where RealEstate stores its files.
    • vaultPresent

      public static boolean vaultPresent
      Flag indicating if Vault is present.
    • econ

      public static net.milkbowl.vault.economy.Economy econ
      The economy provider from Vault.
    • perms

      public static net.milkbowl.vault.permission.Permission perms
      The permission provider from Vault.
    • ess

      public static com.earth2me.essentials.Essentials ess
      Essentials plugin instance, if available.
    • instance

      public static RealEstate instance
      Singleton instance of the RealEstate plugin.
    • transactionsStore

      public static TransactionsStore transactionsStore
      The transactions store for managing claim transactions.
    • claimAPI

      public static IClaimAPI claimAPI
      The active claim management API implementation.
  • Constructor Details

    • RealEstate

      public RealEstate()
      Default constructor for the RealEstate plugin.
  • Method Details

    • onEnable

      public void onEnable()
      Called when the plugin is enabled.

      Initializes the plugin instance, checks for required dependencies (Vault, economy, permissions), sets up the appropriate claim API, loads configuration files, registers command conditions and commands, and copies required resource files to the plugin directory.

      Specified by:
      onEnable in interface org.bukkit.plugin.Plugin
      Overrides:
      onEnable in class org.bukkit.plugin.java.JavaPlugin
    • addLogEntry

      public void addLogEntry(String entry)
      Adds a log entry to the log file specified in the configuration.
      Parameters:
      entry - the log entry to add