mirror of
https://github.com/AppleDash/SaneEconomy.git
synced 2024-11-22 01:56:22 +01:00
Fix failing tests (bug with equals instead of compareTo)
This commit is contained in:
parent
77ba58e333
commit
bb02d78b88
@ -77,7 +77,7 @@ public class Currency {
|
||||
*/
|
||||
public String formatAmount(BigDecimal amount) {
|
||||
return ChatColor.translateAlternateColorCodes('&',
|
||||
MessageUtils.indexedFormat(this.balanceFormat, this.format.format(amount), amount.equals(BigDecimal.ONE) ? this.nameSingular : this.namePlural)
|
||||
MessageUtils.indexedFormat(this.balanceFormat, this.format.format(amount), amount.compareTo(BigDecimal.ONE) == 0 ? this.nameSingular : this.namePlural)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ import org.appledash.saneeconomy.economy.logger.TransactionLogger;
|
||||
import org.appledash.saneeconomy.vault.VaultHook;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* Created by appledash on 9/18/16.
|
||||
@ -26,4 +27,9 @@ public class MockSaneEconomy implements ISaneEconomy {
|
||||
public VaultHook getVaultHook() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLastName(UUID uuid) {
|
||||
return uuid.toString();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user