forked from MilkBowl/VaultAPI
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Version; Readd AbstractEconomy to old source branch.
- Loading branch information
1 parent
f158f98
commit 92bc7ae
Showing
3 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
src/main/java/net/milkbowl/vault/economy/AbstractEconomy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
|
||
} |