Added IdentityEconomy#supportsOfflineOperations

This commit is contained in:
lbenav8095 2023-03-29 22:35:11 -06:00
parent 5dc0217eb7
commit 1a36c9963d
3 changed files with 19 additions and 3 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.milkbowl.vault</groupId>
<artifactId>vaultapi</artifactId>
<version>2.0-SNAPSHOT</version>
<version>2.0-SNAPSHOT-PRE</version>
<name>VaultAPI</name>
<description>Vault is a Permissions &amp; Economy API to allow plugins to more easily hook into these systems without needing to hook each individual system themselves.

View File

@ -36,7 +36,7 @@ public interface IdentityEconomy extends Economy{
/**
* Used to determine if IdentityEconomy was built through
* the EconomyWrapper as a LegacyEconomy.
* If true, method {@link #getAllRecords()} will not be work.
* If false, 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 true if operation is supported
@ -46,13 +46,24 @@ public interface IdentityEconomy extends Economy{
/**
* Used to determine if IdentityEconomy was built through
* the EconomyWrapper as a LegacyEconomy.
* If true, the method {@link #getAllOnline()} (UUID)} will not be work.
* If false, 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();
/**
* Used to determine if IdentityEconomy was built through
* the EconomyWrapper as a LegacyEconomy.
* If false, all operations must be done with players that
* are online/connected to the server in real time.
* If true, you should expect to call these operations
* asynchronously.
* @return true if operation is supported
*/
public boolean supportsOfflineOperations();
/*
* Account-related methods follow.
*/

View File

@ -23,6 +23,11 @@ public class LegacyEconomy implements IdentityEconomy {
return false;
}
@Override
public boolean supportsOfflineOperations(){
return false;
}
@Override
public boolean isEnabled() {
return economy.isEnabled();