Improved auctions
- Added Starting Bid (only for first bid) - Fixed missing $'s in messages - Improved the way numbers are displayed in auctions for readability - Added AuctionActions to store bids by users - Removed as much code that was relying on text being in embeds as possible - Improved structure of code related to auctions
This commit is contained in:
@@ -216,4 +216,16 @@ public class Util {
|
||||
return str.toUpperCase();
|
||||
return str.toUpperCase().charAt(0) + str.toLowerCase().substring(1);
|
||||
}
|
||||
|
||||
public static String formatNumber(int price) {
|
||||
String priceString = new StringBuilder(String.valueOf(price)).reverse().toString();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int i = 0;
|
||||
while (i + 3 < priceString.length()) {
|
||||
sb.append(priceString, i, i + 3).append(",");
|
||||
i += 3;
|
||||
}
|
||||
sb.append(priceString.substring(i)).reverse();
|
||||
return "" + sb;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user