Large Auction Cleanup + Auction Events

- Auction Enums
- Better Notification Handling
- Auction Cancelation Events
- Lang Key Cleanup
This commit is contained in:
Kam committed 2026-02-18 04:55:03 -05:00
1 parent 0512588a7a
commit 4510b3bbd1
31 files changed
+889 -578

No files matched your search

@@ -20,6 +20,7 @@ import static kamkeel.npcs.util.ColorUtil.sendMessage;
import static kamkeel.npcs.util.ColorUtil.sendResult;
public class AuctionCommand extends CommandKamkeelBase {
private static final int COMMAND_PAGE_SIZE = 10;
public AuctionCommand() {
super();
@@ -62,9 +63,10 @@ public class AuctionCommand extends CommandKamkeelBase {
}
}
List<AuctionListing> listings = controller.getActiveListings(null, page - 1, 10);
page = Math.max(1, page);
List<AuctionListing> listings = controller.getActiveListings(null, page - 1, COMMAND_PAGE_SIZE);
int total = controller.getTotalActiveListings(null);
int totalPages = Math.max(1, (int) Math.ceil((double) total / 10));
int totalPages = Math.max(1, (int) Math.ceil((double) total / COMMAND_PAGE_SIZE));
if (listings.isEmpty()) {
sendMessage(sender, "\u00A77No active auctions found");
@@ -98,6 +100,10 @@ public class AuctionCommand extends CommandKamkeelBase {
return;
}
if (args.length < 1) {
throw new CommandException("Usage: /auction view <player>");
}
String playername = args[0];
List<PlayerData> dataList = PlayerDataController.Instance.getPlayersData(sender, playername);