Class Config

java.lang.Object
me.EtienneDx.AnnotationConfig.AnnotationConfig
me.EtienneDx.RealEstate.Config

public class Config extends me.EtienneDx.AnnotationConfig.AnnotationConfig
Represents the configuration settings for the RealEstate plugin.

This class uses the AnnotationConfig system to load and save configurable options such as keywords for signs, rules for transactions, default prices, durations, messaging settings, and database settings.

  • Field Details

    • pdf

      public org.bukkit.plugin.PluginDescriptionFile pdf
      The plugin description file.
    • configFilePath

      public final String configFilePath
      The file path for the configuration file.
    • logFilePath

      public final String logFilePath
      The file path for the log file.
    • chatPrefix

      public String chatPrefix
      The prefix displayed before any chat message.
    • cfgSignsHeader

      public String cfgSignsHeader
      The header displayed on the top of the signs.
    • cfgSellKeywords

      public List<String> cfgSellKeywords
      A list of possible sign headers used to indicate a claim is for sale.
    • cfgRentKeywords

      public List<String> cfgRentKeywords
      A list of possible sign headers used to indicate a claim is for rent.
    • cfgContainerRentKeywords

      public List<String> cfgContainerRentKeywords
      A list of possible sign headers used for renting container access only.
    • cfgLeaseKeywords

      public List<String> cfgLeaseKeywords
      A list of possible sign headers used to indicate a claim is for lease.
    • cfgAuctionKeywords

      public List<String> cfgAuctionKeywords
      A list of possible sign headers used to indicate a claim is for auction.
    • cfgReplaceSell

      public String cfgReplaceSell
      The text displayed on signs for properties to sell.
    • cfgReplaceRent

      public String cfgReplaceRent
      The text displayed on signs for properties to rent.
    • cfgReplaceLease

      public String cfgReplaceLease
      The text displayed on signs for properties to lease.
    • cfgReplaceAuction

      public String cfgReplaceAuction
      The text displayed on signs for properties to auction.
    • cfgReplaceOngoingRent

      public String cfgReplaceOngoingRent
      The text displayed on the first line of a sign once a claim is rented.
    • cfgContainerRentLine

      public String cfgContainerRentLine
      The text displayed on the third line of a sign when renting container access only.
    • cfgEnableSell

      public boolean cfgEnableSell
      Whether selling claims is enabled.
    • cfgEnableRent

      public boolean cfgEnableRent
      Whether renting claims is enabled.
    • cfgEnableLease

      public boolean cfgEnableLease
      Whether leasing claims is enabled.
    • cfgEnableAuction

      public boolean cfgEnableAuction
      Whether auctioning claims is enabled.
    • cfgCancelAuction

      public boolean cfgCancelAuction
      Whether an auctioneer can cancel their auction after receiving offers.
    • cfgDisableOutbidSelf

      public boolean cfgDisableOutbidSelf
      Whether an auctioneer can outbid themselves.
    • cfgEnableAutoRenew

      public boolean cfgEnableAutoRenew
      Whether players renting claims can enable automatic renew.
    • cfgDestroyRentSigns

      public boolean cfgDestroyRentSigns
      Whether rent signs should be destroyed once the claim is rented.
    • cfgDestroyLeaseSigns

      public boolean cfgDestroyLeaseSigns
      Whether lease signs should be destroyed once the claim is leased.
    • cfgTransferClaimBlocks

      public boolean cfgTransferClaimBlocks
      Whether claim blocks are transferred to the new owner on purchase.
    • cfgUseCurrencySymbol

      public boolean cfgUseCurrencySymbol
      Whether to display prices with a currency symbol on signs.
    • cfgCurrencySymbol

      public String cfgCurrencySymbol
      The currency symbol to use if UseCurrencySymbol is enabled.
    • cfgUseDecimalCurrency

      public boolean cfgUseDecimalCurrency
      Whether decimal currency values are allowed.
    • cfgMessageOwner

      public boolean cfgMessageOwner
      Whether the owner should be messaged when a claim is rented, leased, or bought.
    • cfgMessageBuyer

      public boolean cfgMessageBuyer
      Whether the buyer should be messaged when a claim is rented, leased, or bought.
    • cfgBroadcastSell

      public boolean cfgBroadcastSell
      Whether a message should be broadcast when a claim is put up for sale, rent, or lease.
    • cfgMailOffline

      public boolean cfgMailOffline
      Whether offline owners/buyers should receive mail notifications.
    • cfgPriceSellPerBlock

      public double cfgPriceSellPerBlock
      The default price per block when selling a claim.
    • cfgPriceRentPerBlock

      public double cfgPriceRentPerBlock
      The default price per block when renting a claim.
    • cfgPriceLeasePerBlock

      public double cfgPriceLeasePerBlock
      The default price per block when leasing a claim.
    • cfgPriceAuctionPerBlock

      public double cfgPriceAuctionPerBlock
      The default price per block when auctioning a claim.
    • cfgPriceAuctionBidStep

      public double cfgPriceAuctionBidStep
      The default auction bid step when auctioning a claim.
    • cfgRentTime

      public String cfgRentTime
      The default duration of a rent period.
    • cfgLeaseTime

      public String cfgLeaseTime
      The default duration of a lease period.
    • cfgAuctionTime

      public String cfgAuctionTime
      The default duration of an auction period.
    • cfgLeasePayments

      public int cfgLeasePayments
      The default number of lease payments required before the buyer gains ownership.
    • cfgPageSize

      public int cfgPageSize
      The number of offers to display per page in the '/re list' command.
    • languageFile

      public String languageFile
      The language file to be used (found in the languages directory).
    • databaseType

      public String databaseType
      The type of database to use: MySQL, YML, or SQLite.
    • sqliteDatabase

      public String sqliteDatabase
      The SQLite database name.
    • mysqlHost

      public String mysqlHost
      The MySQL database host.
    • mysqlPort

      public int mysqlPort
      The MySQL database port.
    • mysqlDatabase

      public String mysqlDatabase
      The MySQL database name.
    • mysqlUsername

      public String mysqlUsername
      The MySQL database username.
    • mysqlPassword

      public String mysqlPassword
      The MySQL database password.
    • mysqlPrefix

      public String mysqlPrefix
      The MySQL table prefix.
    • mysqlUseSSL

      public boolean mysqlUseSSL
      Whether to use SSL for the MySQL connection.
    • mysqlAutoReconnect

      public boolean mysqlAutoReconnect
      Whether the MySQL connection should automatically reconnect.
  • Constructor Details

    • Config

      public Config()
      Constructs a new configuration instance.

      Initializes the plugin description file from the RealEstate instance.

  • Method Details

    • getString

      public String getString(List<String> li)
      Converts a list of strings into a single string with each element separated by a semicolon.
      Parameters:
      li - the list of strings
      Returns:
      the concatenated string
    • getList

      public List<String> getList(String str)
      Splits a string into a list using semicolon as the delimiter.
      Parameters:
      str - the string to split
      Returns:
      a list of strings
    • loadConfig

      public void loadConfig()
      Loads the configuration from the file specified by configFilePath.
      Overrides:
      loadConfig in class me.EtienneDx.AnnotationConfig.AnnotationConfig