Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multicurrency, uuid and legacysupport #153

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve UUID methods' names, dropping the word Player.
These methods are meant for players, non-players and anything with a
UUID.
LlmDl committed Sep 28, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 747940c8c63cc459c0a754aa7daa0294e4847cb6
12 changes: 6 additions & 6 deletions src/main/java/net/milkbowl/vault/economy/AbstractEconomy.java
Original file line number Diff line number Diff line change
@@ -87,12 +87,12 @@ public EconomyResponse withdrawPlayer(OfflinePlayer player, String worldName, do
}

@Override
public EconomyResponse withdrawPlayer(UUID uuid, double amount) {
public EconomyResponse withdraw(UUID uuid, double amount) {
return withdrawPlayer(Bukkit.getOfflinePlayer(uuid), amount);
}

@Override
public EconomyResponse withdrawPlayer(UUID uuid, String worldName, double amount) {
public EconomyResponse withdraw(UUID uuid, String worldName, double amount) {
return withdrawPlayer(Bukkit.getOfflinePlayer(uuid), worldName, amount);
}

@@ -107,12 +107,12 @@ public EconomyResponse depositPlayer(OfflinePlayer player, String worldName, dou
}

@Override
public EconomyResponse depositPlayer(UUID uuid, double amount) {
public EconomyResponse deposit(UUID uuid, double amount) {
return depositPlayer(Bukkit.getOfflinePlayer(uuid), amount);
}

@Override
public EconomyResponse depositPlayer(UUID uuid, String worldName, double amount) {
public EconomyResponse deposit(UUID uuid, String worldName, double amount) {
return depositPlayer(Bukkit.getOfflinePlayer(uuid), worldName, amount);
}

@@ -157,12 +157,12 @@ public boolean createPlayerAccount(OfflinePlayer player, String worldName) {
}

@Override
public boolean createPlayerAccount(UUID uuid) {
public boolean createAccount(UUID uuid) {
return createPlayerAccount(Bukkit.getOfflinePlayer(uuid));
}

@Override
public boolean createPlayerAccount(UUID uuid, String worldName) {
public boolean createAccount(UUID uuid, String worldName) {
return createPlayerAccount(Bukkit.getOfflinePlayer(uuid), worldName);
}
}
12 changes: 6 additions & 6 deletions src/main/java/net/milkbowl/vault/economy/Economy.java
Original file line number Diff line number Diff line change
@@ -250,7 +250,7 @@ public interface Economy {
* @param amount Amount to withdraw
* @return Detailed response of transaction
*/
public EconomyResponse withdrawPlayer(UUID uuid, double amount);
public EconomyResponse withdraw(UUID uuid, double amount);

/**
* @deprecated As of VaultAPI 1.4 use {@link #withdrawPlayer(OfflinePlayer, String, double)} or {@link #withdrawPlayer(UUID, String, double)} instead.
@@ -276,7 +276,7 @@ public interface Economy {
* @param amount Amount to withdraw
* @return Detailed response of transaction
*/
public EconomyResponse withdrawPlayer(UUID uuid, String worldName, double amount);
public EconomyResponse withdraw(UUID uuid, String worldName, double amount);

/**
* @deprecated As of VaultAPI 1.4 use {@link #depositPlayer(OfflinePlayer, double)} or {@link #depositPlayer(UUID, double)} instead.
@@ -300,7 +300,7 @@ public interface Economy {
* @param amount Amount to deposit
* @return Detailed response of transaction
*/
public EconomyResponse depositPlayer(UUID uuid, double amount);
public EconomyResponse deposit(UUID uuid, double amount);

/**
* @deprecated As of VaultAPI 1.4 use {@link #depositPlayer(OfflinePlayer, String, double)} or {@link #depositPlayer(UUID, String, double)} instead.
@@ -328,7 +328,7 @@ public interface Economy {
* @param amount Amount to deposit
* @return Detailed response of transaction
*/
public EconomyResponse depositPlayer(UUID uuid, String worldName, double amount);
public EconomyResponse deposit(UUID uuid, String worldName, double amount);

/**
* @deprecated As of VaultAPI 1.4 use {@link #createBank(String, OfflinePlayer)} or {@link #createBank(String, UUID)} instead.
@@ -465,7 +465,7 @@ public interface Economy {
* @param uuid associated with the account
* @return if the account creation was successful
*/
public boolean createPlayerAccount(UUID uuid);
public boolean createAccount(UUID uuid);

/**
* @deprecated As of VaultAPI 1.4 use {@link #createPlayerAccount(OfflinePlayer, String)} or {@link #createPlayerAccount(UUID, String)} instead.
@@ -489,5 +489,5 @@ public interface Economy {
* @param worldName String name of the world
* @return if the account creation was successful
*/
public boolean createPlayerAccount(UUID uuid, String worldName);
public boolean createAccount(UUID uuid, String worldName);
}