diff --git a/README.md b/README.md
index ce3d0f3..366f881 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ How to include the API with Maven:
net.milkbowl.vault
VaultUnlockedAPI
- 2.2
+ 2.4
provided
@@ -24,7 +24,7 @@ repositories {
maven { url 'https://repo.codemc.org/repository/maven-public' }
}
dependencies {
- compileOnly "net.milkbowl.vault:VaultUnlockedAPI:2.1"
+ compileOnly "net.milkbowl.vault:VaultUnlockedAPI:2.4"
}
```
diff --git a/pom.xml b/pom.xml
index d61402b..bd6ef4b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
net.milkbowl.vault
VaultUnlockedAPI
- 2.3
+ 2.4
VaultUnlockedAPI
diff --git a/src/main/java/net/milkbowl/vault/economy/AbstractEconomy.java b/src/main/java/net/milkbowl/vault/economy/AbstractEconomy.java
new file mode 100644
index 0000000..00a1523
--- /dev/null
+++ b/src/main/java/net/milkbowl/vault/economy/AbstractEconomy.java
@@ -0,0 +1,87 @@
+package net.milkbowl.vault.economy;
+
+import org.bukkit.OfflinePlayer;
+
+@SuppressWarnings("deprecation")
+public abstract class AbstractEconomy implements Economy {
+
+ @Override
+ public boolean hasAccount(OfflinePlayer player) {
+ if (player.getName() == null) return false;
+ return hasAccount(player.getName());
+ }
+
+ @Override
+ public boolean hasAccount(OfflinePlayer player, String worldName) {
+ if (player.getName() == null) return false;
+ return hasAccount(player.getName(), worldName);
+ }
+
+ @Override
+ public double getBalance(OfflinePlayer player) {
+ return getBalance(player.getName());
+ }
+
+ @Override
+ public double getBalance(OfflinePlayer player, String world) {
+ return getBalance(player.getName(), world);
+ }
+
+ @Override
+ public boolean has(OfflinePlayer player, double amount) {
+ if (player.getName() == null) return false;
+ return has(player.getName(), amount);
+ }
+
+ @Override
+ public boolean has(OfflinePlayer player, String worldName, double amount) {
+ if (player.getName() == null) return false;
+ return has(player.getName(), worldName, amount);
+ }
+
+ @Override
+ public EconomyResponse withdrawPlayer(OfflinePlayer player, double amount) {
+ return withdrawPlayer(player.getName(), amount);
+ }
+
+ @Override
+ public EconomyResponse withdrawPlayer(OfflinePlayer player, String worldName, double amount) {
+ return withdrawPlayer(player.getName(), worldName, amount);
+ }
+
+ @Override
+ public EconomyResponse depositPlayer(OfflinePlayer player, double amount) {
+ return depositPlayer(player.getName(), amount);
+ }
+
+ @Override
+ public EconomyResponse depositPlayer(OfflinePlayer player, String worldName, double amount) {
+ return depositPlayer(player.getName(), worldName, amount);
+ }
+
+ @Override
+ public EconomyResponse createBank(String name, OfflinePlayer player) {
+ return createBank(name, player.getName());
+ }
+
+ @Override
+ public EconomyResponse isBankOwner(String name, OfflinePlayer player) {
+ return isBankOwner(name, player.getName());
+ }
+
+ @Override
+ public EconomyResponse isBankMember(String name, OfflinePlayer player) {
+ return isBankMember(name, player.getName());
+ }
+
+ @Override
+ public boolean createPlayerAccount(OfflinePlayer player) {
+ return createPlayerAccount(player.getName());
+ }
+
+ @Override
+ public boolean createPlayerAccount(OfflinePlayer player, String worldName) {
+ return createPlayerAccount(player.getName(), worldName);
+ }
+
+}
\ No newline at end of file