Merge pull request #203 from LRFLEW/master

fractionalDigits()
This commit is contained in:
Nick Minkler 2012-06-29 06:25:18 -07:00
commit ba27fa1ef0
17 changed files with 88 additions and 0 deletions

5
.gitignore vendored
View File

@ -10,3 +10,8 @@ javadoc
Vault.jar
/Vault.iml
/target
#added by LRFLEW
#feel free to remove
bin
*.DS_Store

View File

@ -42,6 +42,14 @@ public interface Economy {
*/
public boolean hasBankSupport();
/**
* Some economy plugins round off after a certain number of digits.
* This function returns the number of digits the plugin keeps
* or -1 if no rounding occurs.
* @return number of digits after the decimal point kept
*/
public int fractionalDigits();
/**
* Format amount into a human readable String This provides translation into
* economy specific formatting to improve consistency between plugins.

View File

@ -255,4 +255,9 @@ public class Economy_3co implements Economy {
economy.createAccount(p, 0);
return true;
}
@Override
public int fractionalDigits() {
return 0;
}
}

View File

@ -230,4 +230,9 @@ public class Economy_AEco implements Economy {
}
return false;
}
@Override
public int fractionalDigits() {
return 0;
}
}

View File

@ -300,4 +300,9 @@ public class Economy_BOSE6 implements Economy {
}
return economy.registerPlayer(playerName);
}
@Override
public int fractionalDigits() {
return 0;
}
}

View File

@ -270,4 +270,9 @@ public class Economy_BOSE7 implements Economy {
}
return economy.registerPlayer(playerName);
}
@Override
public int fractionalDigits() {
return economy.getFractionalDigits();
}
}

View File

@ -299,4 +299,9 @@ public class Economy_Craftconomy implements Economy {
AccountHandler.getAccount(playerName);
return true;
}
@Override
public int fractionalDigits() {
return -1;
}
}

View File

@ -263,4 +263,9 @@ public class Economy_CurrencyCore implements Economy {
this.currency.getAccountManager().createAccount(playerName);
return true;
}
@Override
public int fractionalDigits() {
return -1;
}
}

View File

@ -237,4 +237,9 @@ public class Economy_EconXP implements Economy {
public boolean createPlayerAccount(String playerName) {
return false;
}
@Override
public int fractionalDigits() {
return 0;
}
}

View File

@ -280,4 +280,9 @@ public class Economy_Essentials implements Economy {
public boolean hasAccount(String playerName) {
return com.earth2me.essentials.api.Economy.playerExists(playerName);
}
@Override
public int fractionalDigits() {
return -1;
}
}

View File

@ -209,4 +209,9 @@ public class Economy_McMoney implements Economy {
}
return false;
}
@Override
public int fractionalDigits() {
return -1;
}
}

View File

@ -233,4 +233,9 @@ public class Economy_MineConomy implements Economy {
return false;
}
}
@Override
public int fractionalDigits() {
return 2;
}
}

View File

@ -256,4 +256,9 @@ public class Economy_MultiCurrency implements Economy {
public boolean createPlayerAccount(String playerName) {
return false;
}
@Override
public int fractionalDigits() {
return -1;
}
}

View File

@ -215,4 +215,9 @@ public class Economy_eWallet implements Economy {
econ.createAccount(playerName, 0);
return true;
}
@Override
public int fractionalDigits() {
return 0;
}
}

View File

@ -260,4 +260,9 @@ public class Economy_iConomy4 implements Economy {
iConomy.getBank().addAccount(playerName);
return true;
}
@Override
public int fractionalDigits() {
return 2;
}
}

View File

@ -226,4 +226,9 @@ public class Economy_iConomy5 implements Economy {
iConomy.getAccount(playerName);
return true;
}
@Override
public int fractionalDigits() {
return 2;
}
}

View File

@ -252,4 +252,9 @@ public class Economy_iConomy6 implements Economy {
}
return accounts.create(playerName);
}
@Override
public int fractionalDigits() {
return -1;
}
}