Skip to content

Commit

Permalink
Small API Changes. Add better formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
fernferret committed Aug 16, 2011
1 parent 44e62ec commit c8c6a20
Show file tree
Hide file tree
Showing 10 changed files with 241 additions and 193 deletions.
7 changes: 4 additions & 3 deletions src/com/fernferret/allpay/AllPay.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @author Eric Stokes
*/
public class AllPay {
private static final String version = "1.0.1";
private static final String version = "1.0.2";
protected static final String logPrefix = "[AllPay] - Version " + version;

protected static final Logger log = Logger.getLogger("Minecraft");
Expand Down Expand Up @@ -81,9 +81,10 @@ private void loadRealShopEconomy() {

private void loadBOSEconomy() {
if (this.bank == null && !(this.bank instanceof EssentialsBank)) {
BOSEconomy boseconPlugin = (BOSEconomy) this.plugin.getServer().getPluginManager().getPlugin("BOSEconomy");
Plugin boseconPlugin = this.plugin.getServer().getPluginManager().getPlugin("BOSEconomy");
if (boseconPlugin != null) {
this.bank = new BOSEconomyBank(boseconPlugin);

this.bank = new BOSEconomyBank((BOSEconomy) boseconPlugin);
log.info(logPrefix + " - hooked into BOSEconomy " + this.plugin.getDescription().getFullName());
}
}
Expand Down
7 changes: 2 additions & 5 deletions src/com/fernferret/allpay/BOSEconomyBank.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ public BOSEconomyBank(BOSEconomy plugin) {
}

@Override
public String getFormattedMoneyAmount(double amount) {
if (amount == 1) {
return amount + " " + this.plugin.getMoneyName();
}
return amount + " " + this.plugin.getMoneyNamePlural();
public String getFormattedMoneyAmount(Player player, double amount) {
return this.formatCurrency(amount, this.plugin.getMoneyName(), this.plugin.getMoneyNamePlural());
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/com/fernferret/allpay/EssentialsBank.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public String getEconUsed() {
}

@Override
public String getFormattedMoneyAmount(double amount) {
public String getFormattedMoneyAmount(Player player, double amount) {
return Economy.format(amount);
}

Expand Down
Loading

0 comments on commit c8c6a20

Please sign in to comment.