Class BankAccountProxy

java.lang.Object
com.pixelmonmod.pixelmon.api.economy.BankAccountProxy

public class BankAccountProxy extends Object
Static factory for managing pixelmon bank accounts
  • Constructor Details

    • BankAccountProxy

      public BankAccountProxy()
  • Method Details

    • hasImplementation

      public static boolean hasImplementation()
      Checks if an account manager has already been assigned
      Returns:
      True if an account manager exists
    • setAccountManager

      public static void setAccountManager(BankAccountManager accountManager)
      Sets the implementation of the account manager
      Parameters:
      accountManager - The new account manager implementation
    • getBankAccountNow

      @Nullable public static BankAccount getBankAccountNow(UUID uuid)
      Unsafe method of getting the player's (UUID) bank account Will return null if not found
      Parameters:
      uuid - The UUID of the owner of the account
      Returns:
      The bank account found
    • getBankAccountNow

      @Nullable public static BankAccount getBankAccountNow(net.minecraft.server.level.ServerPlayer player)
      Unsafe method of getting the player's bank account Will return null if not found
      Parameters:
      player - The owner of the account
      Returns:
      The bank account found
    • getBankAccount

      public static CompletableFuture<? extends BankAccount> getBankAccount(UUID uuid)
      Attempts to get the bank account for the given UUID, presumably a player's UUID
      Parameters:
      uuid - The owner of the account
      Returns:
      The potential bank account
    • getBankAccount

      public static CompletableFuture<? extends BankAccount> getBankAccount(net.minecraft.server.level.ServerPlayer player)
      Attempts to get the bank account for the given ServerPlayer
      Parameters:
      player - The owner of the account
      Returns:
      The potential bank account