From 5725fb027da003677a5f7a2df1daaf50ac7e811c Mon Sep 17 00:00:00 2001 From: "Daniel V." Date: Tue, 17 Dec 2024 20:13:53 -0500 Subject: [PATCH] Add new createAccount methods with parameter to indicate if player account or not. --- .../net/milkbowl/vault2/economy/Economy.java | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/milkbowl/vault2/economy/Economy.java b/src/main/java/net/milkbowl/vault2/economy/Economy.java index 14185ff..0b88114 100644 --- a/src/main/java/net/milkbowl/vault2/economy/Economy.java +++ b/src/main/java/net/milkbowl/vault2/economy/Economy.java @@ -187,7 +187,7 @@ public interface Economy { */ /** - * Attempts to create a account for the given UUID. + * Attempts to create an account for the given UUID. * * @param accountID UUID associated with the account. * @param name UUID associated with the account. @@ -195,6 +195,17 @@ public interface Economy { */ boolean createAccount(final UUID accountID, final String name); + /** + * Creates a new account with the provided information. + * + * @param accountID The UUID of the account to be created. + * @param name The name associated with the account. + * @param player A flag indicating if the account is a player account. + * + * @return true if the account was successfully created, false otherwise. + */ + boolean createAccount(final UUID accountID, final String name, final boolean player); + /** * Attempts to create an account for the given UUID on the specified world * IMPLEMENTATION SPECIFIC - if an economy plugin does not support this then @@ -207,6 +218,18 @@ public interface Economy { */ boolean createAccount(final UUID accountID, final String name, final String worldName); + /** + * Creates a new account with the given parameters. + * + * @param accountID The UUID of the account to be created. + * @param name The name of the account holder. + * @param worldName The world name associated with the account. + * @param player A boolean indicating if the account belongs to a player. + * + * @return True if the account was successfully created, false otherwise. + */ + boolean createAccount(final UUID accountID, final String name, final String worldName, final boolean player); + /** * Returns a map that represents all the UUIDs which have accounts in the * plugin, as well as their last-known-name. This is used for Vault's economy