NightMarket v1.6 - The Dynamic Discount Update!
This update introduces a dynamic new discount system, giving server owners more control over the market's economy and providing an exciting experience for players.
✨ New Features
Dynamic Item Discounts
Items can now be configured to have a chance of appearing on sale for each player. When an item is selected for a player's market, the plugin will roll a chance to apply a discount.
- Both the chance of a discount and the percentage of the discount are fully configurable on a per-item basis.
- This system is player-specific, meaning one player might see an item on sale while another sees it at full price, encouraging players to check their market frequently.
Strikethrough Price Display
To clearly communicate a sale, discounted items will now display the original price with a strikethrough next to the new, lower price in the item's lore.
Customizable Price Formatting
Server owners now have complete control over how prices are displayed. A new price-placeholders section in items.yml allows you to define the exact text and color format for both normal and discounted prices.
⚙️ Configuration Changes (items.yml)
To support these new features, items.yml has been updated with two new sections:
discount section (per-item):
You can now add a discount block to any item in the items section.
- chance: The probability (e.g., 25.0 for 25%) that the item will be on sale.
- percentage: The discount amount (e.g., 50.0 for 50% off).
Code (Text):
items:
my_awesome_sword:
price: 1000.0
discount:
chance: 10.0
percentage: 50.0
# ... other settings
price-placeholders section (global):
This new top-level section controls the display format for all item prices.
- normal: The format for a standard price. Uses %final_price%.
- discounted: The format for a sale price. Uses %original_price% and %final_price%.
To use it, simply add a line containing only %price_placeholder% in your item's lore.
Code (Text):
price-placeholders:
normal: "&ePrice: &6%final_price%"
discounted: "&ePrice: &m&6%original_price%&r &a%final_price%"
# ... inside an item's lore:
# lore:
# - "A very cool sword."
# - "%price_placeholder%"
Thank you for using NightMarket! We hope you and your players enjoy these new economic features.