mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 22:15:06 +00:00
Auction Blacklist System
This commit is contained in:
1 parent
b85804af98
commit
fe998ea31c
10 files changed
+756
-240
No files matched your search
@@ -21,6 +21,7 @@ import noppes.npcs.constants.EnumAuctionSort;
|
||||
import noppes.npcs.constants.EnumAuctionStatus;
|
||||
import noppes.npcs.constants.EnumClaimType;
|
||||
import noppes.npcs.constants.EnumNotificationType;
|
||||
import noppes.npcs.controllers.data.AuctionBlacklist;
|
||||
import noppes.npcs.controllers.data.AuctionClaim;
|
||||
import noppes.npcs.controllers.data.AuctionFilter;
|
||||
import noppes.npcs.controllers.data.AuctionListing;
|
||||
@@ -86,6 +87,7 @@ public class AuctionController implements IAuctionHandler {
|
||||
|
||||
public AuctionController() {
|
||||
Instance = this;
|
||||
AuctionBlacklist.reload();
|
||||
load();
|
||||
}
|
||||
|
||||
@@ -241,6 +243,11 @@ public class AuctionController implements IAuctionHandler {
|
||||
return "Auction is disabled.";
|
||||
}
|
||||
|
||||
// Check blacklist (with bypass for admins)
|
||||
if (AuctionBlacklist.isBlacklistedForPlayer(item, player)) {
|
||||
return "This item cannot be listed on the Auction House.";
|
||||
}
|
||||
|
||||
// Validate minimum price
|
||||
if (startingPrice < ConfigMarket.MinimumListingPrice) {
|
||||
return "Starting price must be at least " + ConfigMarket.MinimumListingPrice + " " + ConfigMarket.CurrencyName + ".";
|
||||
@@ -1414,4 +1421,18 @@ public class AuctionController implements IAuctionHandler {
|
||||
AuctionListing listing = listings.get(listingId);
|
||||
return listing != null && listing.isSeller(playerUUID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload the item blacklist from config.
|
||||
*/
|
||||
public void reloadBlacklist() {
|
||||
AuctionBlacklist.reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an item is blacklisted.
|
||||
*/
|
||||
public boolean isItemBlacklisted(ItemStack item) {
|
||||
return AuctionBlacklist.isBlacklisted(item);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user