* In order to register/provide it, you should use {@link IdentityEconomyWrapper#registerProviders()} */ @@ -35,15 +36,22 @@ public interface IdentityEconomy extends Economy{ /** * Used to determine if IdentityEconomy was built through * the EconomyWrapper as a LegacyEconomy. - * If true, methods such as {@link #getAllRecords()} and {@link #getAllOnline()} (UUID)} - * will not be work. + * If true, method {@link #getAllRecords()} will not be work. * This was made in order to support plugins which use older versions of VaultAPI/Vault. * You can also use it / override it to disable previous mentioned methods! - * @return if this is a legacy economy + * @return true if operation is supported */ - public default boolean isLegacy(){ - return false; - } + public boolean supportsAllRecordsOperation(); + + /** + * Used to determine if IdentityEconomy was built through + * the EconomyWrapper as a LegacyEconomy. + * If true, the method {@link #getAllOnline()} (UUID)} will not be work. + * This was made in order to support plugins which use older versions of VaultAPI/Vault. + * You can also use it / override it to disable previous mentioned methods! + * @return true if operation is supported + */ + public boolean supportsAllOnlineOperation(); /* * Account-related methods follow. diff --git a/src/main/java/net/milkbowl/vault/economy/LegacyEconomy.java b/src/main/java/net/milkbowl/vault/economy/LegacyEconomy.java index 7f14297..2c6e739 100644 --- a/src/main/java/net/milkbowl/vault/economy/LegacyEconomy.java +++ b/src/main/java/net/milkbowl/vault/economy/LegacyEconomy.java @@ -14,8 +14,13 @@ public class LegacyEconomy implements IdentityEconomy { } @Override - public boolean isLegacy() { - return true; + public boolean supportsAllRecordsOperation() { + return false; + } + + @Override + public boolean supportsAllOnlineOperation() { + return false; } @Override diff --git a/src/main/java/net/milkbowl/vault/economy/MultiEconomy.java b/src/main/java/net/milkbowl/vault/economy/MultiEconomy.java index 72439ee..1328e9a 100644 --- a/src/main/java/net/milkbowl/vault/economy/MultiEconomy.java +++ b/src/main/java/net/milkbowl/vault/economy/MultiEconomy.java @@ -13,7 +13,8 @@ import java.util.Collection; * In order to register/provide it, you should use {@link MultiEconomyWrapper#registerProviders()} * Inside this interface, we make use of the term "implementation" to refer to an actual currency. * You should expect that these currencies/implementations might - * return true for {@link IdentityEconomy#isLegacy()} in case plugin's author preference! + * return false for both {@link IdentityEconomy#supportsAllRecordsOperation()} and + * {@link IdentityEconomy#supportsAllOnlineOperation()} in case of plugin's author preference! */ public interface MultiEconomy {