Class PlayerAccountManagerBase

java.lang.Object
dev.satyrn.xpeconomy.economy.PlayerAccountManagerBase
All Implemented Interfaces:
ConfigurationConsumer, AccountManager
Direct Known Subclasses:
MySQLAccountManager, YamlAccountManager

public abstract class PlayerAccountManagerBase extends Object implements AccountManager, ConfigurationConsumer
Manages player accounts.
  • Field Details

  • Constructor Details

    • PlayerAccountManagerBase

      protected PlayerAccountManagerBase(@NotNull @NotNull Configuration configuration)
      Creates a new instance of an account manager.
      Parameters:
      configuration - The configuration manager.
  • Method Details

    • reloadConfiguration

      public void reloadConfiguration(@NotNull @NotNull Configuration configuration)
      Called when the configuration is reloaded. Sets the state of the consumer based on the new configuration.
      Specified by:
      reloadConfiguration in interface ConfigurationConsumer
      Parameters:
      configuration - The configuration.
    • hasAccount

      public boolean hasAccount(@NotNull @NotNull UUID uuid)
      Checks if an account exists for a given player UUID.
      Specified by:
      hasAccount in interface AccountManager
      Parameters:
      uuid - The player UUID.
      Returns:
      Whether the account exists.
    • createAccount

      @Nullable public @Nullable Account createAccount(@Nullable @Nullable org.bukkit.OfflinePlayer player)
      Creates an account for a player.
      Specified by:
      createAccount in interface AccountManager
      Parameters:
      player - The player instance.
      Returns:
      The new account.
    • getAccount

      @Nullable public @Nullable Account getAccount(@NotNull @NotNull UUID uuid)
      Gets an account with a specific player UUID.
      Specified by:
      getAccount in interface AccountManager
      Parameters:
      uuid - The player UUID
      Returns:
      The account instance.