NightMarket

NightMarket

Per-player Night Market with random items & random discounts, reveal-card GUI, full in-game admin setup, Vault economy, command rewards, and custom-item support (Oraxen/ItemsAdder/MMOItems). Paper 1.21.1.

85 downloads 0 followers

NightMarket - Per-Player Random Market Plugin

A configurable, per-player "night market" plugin for Minecraft servers running Paper 1.21.1 — every player gets their own rotating shop of random offers with random discounts, revealed by flipping cards in a clean GUI.


✨ Key Features

🎯 Core Systems

  • Per-Player Random Markets - Each player rolls their own unique set of offers; no two markets are the same
  • Seasonal Auto-Reset - Markets stay locked in until the configurable season ends, then regenerate automatically
  • Random Discounts - Every offer gets a random discount between your min/max; original price, discount %, and final price are shown and never change until reset
  • Reveal-Card GUI - Offers start face-down and flip open with a short animation, then become buyable, then "Sold Out"
  • Interactive GUIs - Clean, intuitive menus for both players and admins

🔧 Admin Tools

  • In-Game Item Pool Editor - Add, edit, and remove offers without touching config files
  • Add Items from Hand - Supports vanilla, Oraxen, ItemsAdder, and MMOItems with full NBT preservation
  • One-Click Command Rewards - Create command-based offers straight from the pool menu
  • Player Management - Reset a single player's market, refresh it, or reset everyone at once
  • Live Reload - Update config and language files without restarting

⚡ Performance & Safety

  • Async Database - All saves run off the main thread, so the server never stalls on disk I/O
  • Ordered Write Queue - A single FIFO queue guarantees a market is saved before any sold-out update, so purchases can never be lost across restarts
  • In-Memory Caching - Markets and the item pool are cached for instant access
  • Anti-Dupe Protection - Per-player busy guard + sold-out flag prevent double-clicks, race conditions, and item duplication
  • Graceful Shutdown - Pending writes are flushed safely on disable
  • Graceful Disable - If Vault or an economy provider is missing, the plugin disables itself with a clear console message instead of erroring

🎁 Flexible Rewards

  • Two Reward Types per Offer:
    • Item - Give a vanilla or custom item
    • Command - Run one or more console commands on purchase (ranks, kits, money, crate keys, anything)
  • Custom Item Support - Oraxen, ItemsAdder, and MMOItems (auto-detected; rebuilt fresh on purchase with a safe fallback)
  • NBT Preservation - Custom enchants, lore, and attributes are kept
  • Placeholders - {player} / %player%, {uuid}, {item_name}, {price}; chain commands with ;;

🎨 Fully Translatable

✓ All GUI titles        ✓ All item names        ✓ All lore
✓ All chat messages     ✓ MiniMessage support   ✓ Hex & legacy colors
✓ en_US included        ✓ id_ID included        ✓ Live language switching

📦 Installation

  1. Install Vault and a Vault-compatible economy plugin (e.g. EssentialsX)
  2. Download the latest .jar and place it in your server's plugins folder
  3. Restart your server — config.yml and language files generate automatically
  4. Run /nightmarket admin to start adding offers
  5. Reload anytime with /nightmarket reload

🎮 Commands

Player Commands

  • /nightmarket or /nm - Open your Night Market

Admin Commands

  • /nightmarket admin - Open the admin dashboard
  • /nightmarket reset <player> - Reset a player's market
  • /nightmarket resetall - Reset every player's market
  • /nightmarket reload - Reload config and language files

🔐 Permissions

  • nightmarket.use - Open and buy from the market (default: true)
  • nightmarket.admin - Admin GUI and management (default: op)
  • nightmarket.reset - Reset player markets (default: op)
  • nightmarket.reload - Reload the plugin (default: op)

⚙️ Configuration

Customizable via config.yml — most settings are also editable in-game:

language: en_US
market:
  size: 6              # offers per player
  discount-min: 10     # min random discount (%)
  discount-max: 70     # max random discount (%)
  duration-hours: 24   # season length before auto-reset
purchase:
  drop-if-inventory-full: true
hooks:
  custom-items: true   # Oraxen / ItemsAdder / MMOItems

🤝 Compatibility

  • Minecraft Version: 1.21.1 (Paper)
  • Java Version: 21+
  • Required: Vault + an economy provider
  • Optional Dependencies:
    • Oraxen (custom items)
    • ItemsAdder (custom items)
    • MMOItems (custom items)

🐛 Support & Feedback

Found a bug or have a suggestion? Please report issues with:

  • Server version (e.g., Paper 1.21.1)
  • Plugin version
  • Steps to reproduce
  • Console errors (if any)

on our discord


Made with ❤️ by ResistanceCore

If you enjoy this plugin, please leave a ❤️ and share it with other server owners!

No gallery available for this project.

Version Minecraft Loader Download

NightMarket 1.0.0

1.0.0

1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11
bukkit, paper, spigot
Download