diff --git a/pom.xml b/pom.xml index ce04f51..403c641 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 net.milkbowl.vault vaultapi - 2.4-SNAPSHOT + 2.0-SNAPSHOT VaultAPI Vault is a Permissions & Economy API to allow plugins to more easily hook into these systems without needing to hook each individual system themselves. diff --git a/src/main/java/net/milkbowl/vault/economy/IdentityEconomy.java b/src/main/java/net/milkbowl/vault/economy/IdentityEconomy.java index f368121..96681f9 100644 --- a/src/main/java/net/milkbowl/vault/economy/IdentityEconomy.java +++ b/src/main/java/net/milkbowl/vault/economy/IdentityEconomy.java @@ -25,9 +25,10 @@ import java.util.UUID; /** * Adds UUID support to the Economy interface. - * In case of {@link #isLegacy()} returning false, methods such as: + * In case of {@link #supportsAllRecordsOperation()} or {@link #supportsAllOnlineOperation()} + * returning true, methods such as * {@link #getAllRecords()} and {@link #getAllOnline()} - * should be expected to work. + * should not be expected to work. *

* 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 {