mirror of
https://github.com/Crazy-Crew/CrazyAuctions.git
synced 2025-01-02 18:38:10 +01:00
Save Name (Performance)
Save the names to file instead of having to do heavy operations each time to load the data.
This commit is contained in:
parent
aee0169d61
commit
8ab0fafd62
@ -327,6 +327,7 @@ public class AuctionCommand implements CommandExecutor {
|
||||
for (; data.contains("Items." + num); num++) ;
|
||||
data.set("Items." + num + ".Price", price);
|
||||
data.set("Items." + num + ".Seller", seller);
|
||||
data.set("Items." + num + ".SellerName", player.getName());
|
||||
|
||||
if (args[0].equalsIgnoreCase("bid")) {
|
||||
data.set("Items." + num + ".Time-Till-Expire", Methods.convertToMill(config.getString("Settings.Bid-Time", "2m 30s")));
|
||||
@ -356,6 +357,7 @@ public class AuctionCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
data.set("Items." + num + ".TopBidder", "None");
|
||||
data.set("Items." + num + ".TopBidderName", "None");
|
||||
|
||||
ItemStack stack = item.clone();
|
||||
stack.setAmount(amount);
|
||||
|
@ -816,6 +816,7 @@ public class GuiListener implements Listener {
|
||||
|
||||
data.set("Items." + ID + ".Price", bid);
|
||||
data.set("Items." + ID + ".TopBidder", player.getUniqueId().toString());
|
||||
data.set("Items." + ID + ".TopBidderName", player.getName());
|
||||
|
||||
Map<String, String> placeholders = new HashMap<>();
|
||||
placeholders.put("%Bid%", bid + "");
|
||||
|
Loading…
Reference in New Issue
Block a user