Class BankAccountProxy
java.lang.Object
com.pixelmonmod.pixelmon.api.economy.BankAccountProxy
Static factory for managing pixelmon bank accounts
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture<? extends BankAccount>
getBankAccount
(UUID uuid) static CompletableFuture<? extends BankAccount>
getBankAccount
(net.minecraft.server.level.ServerPlayer player) Attempts to get the bank account for the givenServerPlayer
static BankAccount
getBankAccountNow
(UUID uuid) Unsafe method of getting the player's (UUID
) bank account Will return null if not foundstatic BankAccount
getBankAccountNow
(net.minecraft.server.level.ServerPlayer player) Unsafe method of getting the player's bank account Will return null if not foundstatic boolean
Checks if an account manager has already been assignedstatic void
setAccountManager
(BankAccountManager accountManager) Sets the implementation of the account manager
-
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
Sets the implementation of the account manager- Parameters:
accountManager
- The new account manager implementation
-
getBankAccountNow
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
- 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 givenServerPlayer
- Parameters:
player
- The owner of the account- Returns:
- The potential bank account
-