Config

This is the main configuration file for NightMarket. It acts as the central control panel for the plugin's core mechanics, including the market schedule, economy integration, stock systems, GUI appear

Parameter Breakdown

General Settings

These settings control the plugin's core behavior.

config-version

  • Type: Integer

  • Description: This is an internal version number used by the plugin to manage automatic configuration updates. You should not change this value.

check-updates

  • Type: Boolean

  • Default: true

  • Description: If true, the plugin will check for new versions upon server startup. Operators will be notified in-game and in the console if an update is available.

Stock System (stock_system)

This section is crucial for defining your market's economy and how item availability is handled.

mode

  • Type: String

  • Default: GLOBAL

  • Description: Determines the behavior of the stock value set for items in items.yml.

  • Valid Options:

    • GLOBAL: Stock is server-wide. If an item has a stock of 5, only 5 of that item can be sold across the entire server during the market cycle. Each player can also only purchase each unique item once. This mode is perfect for creating rare, exclusive items that players will compete for.

    • PLAYER: Stock is per-player. If an item has a stock of 5, every single player can buy that item up to 5 times during the market cycle. This mode is ideal for items you want to be more widely available to your entire community.

Market Settings (market_settings)

This section configures special market behaviors, particularly related to the Global Items system.

number_of_global_items_to_show

  • Type: Integer

  • Default: 1

  • Description: Defines how many "global" items (items marked with global: true in items.yml) should be selected and featured in the market for all players. If set to 0, the global item feature is disabled.

GUI Display Items

These sections define the appearance of special, non-purchasable items within the market GUI. They support material, name, lore, and Custom Model Data (e.g., material: "DIAMOND:1001").

global_placeholder_item

  • Description: The item that appears in a market slot before a player has spent the reroll cost to reveal it.

global_purchased_item_display

  • Description: The item that replaces a purchased item in the GUI, indicating that the player has already bought it.

global_out_of_stock_item_display

  • Description: The item shown when an item with GLOBAL stock runs out and is no longer available for anyone on the server.

Market Schedule (market_schedule)

Controls the entire timing, cycle, and announcement system for the market.

open_duration / close_duration

  • Type: Integer (in seconds)

  • Description: Defines the length of the market's open and closed phases.

    • Example: 1 day = 86400 seconds, 7 days = 604800 seconds.

market_open_broadcast / market_close_broadcast

  • Type: List of Strings

  • Description: A list of messages that are broadcast to the entire server when the market opens or closes.

force_open_message / force_close_message

  • Type: List of Strings

  • Description: Messages broadcast when an administrator uses the /nm forceopen or /nm forceclose commands.

announcements

  • Type: Object

  • Description: A powerful system for scheduling announcement broadcasts before the market opens or closes. It contains two lists: before_open and before_close. Each entry in these lists is an object with:

    • time_before: The time in seconds before the event to send the message.

    • message: A list of strings to broadcast.

Economy (economy)

Handles all integration with currency plugins.

enabled

  • Type: Boolean

  • Default: true

  • Description: If true, the plugin will hook into an economy provider. If false, all economy features are disabled, all items will be free, and no economy plugin is required.

provider

  • Type: String

  • Default: VAULT

  • Description: The name of the economy plugin to use. This plugin must be installed on your server.

  • Supported Values: VAULT, PLAYER_POINTS, TOKEN_MANAGER.

Placeholders (placeholders)

Controls the output of PlaceholderAPI placeholders provided by the plugin.

open_text / closed_text

  • Type: String

  • Description: The text that the %nightmarket_open% placeholder will return when the market is open or closed, respectively. Supports color codes.

Messages (messages)

This section contains all user-facing messages. This allows for full translation and customization. You can use standard Minecraft color codes (e.g., &c, &l).

  • Example Keys: no_permission, not_enough_money, not_enough_items, permission_denied_lore, etc.

Sounds (sounds)

This section contains all configurable sound effects for various actions. Each sound is an object with:

  • sound: The name of the sound from Minecraft's sound events. A full list can be found on the Minecraft Wiki.

  • volume: The volume of the sound (e.g., 1.0 is 100%).

  • pitch: The pitch of the sound (e.g., 1.0 is normal, 2.0 is high-pitched).

Full Example: config.yml

This is an example of a complete, up-to-date config.yml file incorporating all features.

# -------------------------------------------------- #
#               NightMarket Main Config              #
# -------------------------------------------------- #

# Internal version number. Do not change this.
config-version: 11

# -- Stock System --
# Determines how item stock is managed.
# GLOBAL: Server-wide stock. Exclusive, limited items. Each player can only buy a unique item ONCE.
# PLAYER: Per-player stock. Widely available items. Every player gets their own stock limit.
stock_system:
  mode: GLOBAL

# -- Market Settings --
# Configure special market behaviors, like the Global Items feature.
market_settings:
  # How many "global" items (from items.yml) should be featured for ALL players.
  # Set to 0 to disable.
  number_of_global_items_to_show: 1

# -- GUI Display Items --
# These items are used for special slots in the market GUI.
# You can use CustomModelData with the format: 'MATERIAL:1234'

# Item shown before a slot is revealed.
global_placeholder_item:
  material: ORANGE_STAINED_GLASS_PANE
  name: '&6&l??? Click to Reveal ???'
  lore:
    - '&7Click me to see what item is hidden!'

# Item shown after a player has purchased from a slot.
global_purchased_item_display:
  material: RED_STAINED_GLASS_PANE
  name: '&c&lSOLD'
  lore:
    - '&7You have already purchased this item.'

# Item shown when a GLOBAL stock item runs out.
global_out_of_stock_item_display:
  material: GRAY_STAINED_GLASS_PANE
  name: '&8&lOUT OF STOCK'
  lore:
    - '&7This item is no longer available'
    - '&7in this market cycle.'

# -- Market Schedule --
# All durations are in seconds. (1 day = 86400, 7 days = 604800)
market_schedule:
  open_duration: 604800
  close_duration: 259200
  market_open_broadcast:
    - '&6&l[Night Market] &eThe Night Market is now OPEN!'
  market_close_broadcast:
    - '&6&l[Night Market] &cThe Night Market has CLOSED!'
  force_open_message:
    - '&6&l[Night Market] &eAn admin has forcefully opened the market!'
  force_close_message:
    - '&6&l[Night Market] &cAn admin has forcefully closed the market.'
  announcements:
    before_open:
      - time_before: 3600 # 1 hour
        message:
          - '&6&l[Night Market] &eThe market opens in 1 hour!'
    before_close:
      - time_before: 86400 # 1 day
        message:
          - '&6&l[Night Market] &cThe market closes in 24 hours! Make your final purchases!'

# -- Economy Settings --
economy:
  # Set to false to make all items free. No economy plugin needed if false.
  enabled: true
  # Supported: VAULT, PLAYER_POINTS, TOKEN_MANAGER
  provider: VAULT

# -- PlaceholderAPI Settings --
placeholders:
  # Output for the %nightmarket_open% placeholder.
  open_text: '&aOpen'
  closed_text: '&cClosed'

# -- General Settings --
# If true, OPs will be notified of new versions when they join.
check-updates: true

# -- Messages --
# All user-facing messages. Use '&' for color codes.
messages:
  no_permission: '&cYou do not have permission to do that.'
  no_permission_open: '&cYou do not have permission to open the Night Market.'
  not_enough_money: '&cYou do not have enough money to purchase this.'
  not_enough_items: '&cYou do not have the required items for this trade.'
  item_successfully_purchased: '&aYou successfully purchased %item_name% for %price%!'
  market_is_closed: '&cThe Night Market is currently closed.'
  permission_denied_lore:
    - ''
    - '&cYou do not have permission to purchase this item!'

# -- Sounds --
# All sound effects for various actions.
# Sound names can be found here: [https://minecraft.fandom.com/wiki/Sounds.json](https://minecraft.fandom.com/wiki/Sounds.json)
sounds:
  item_purchase:
    sound: ENTITY_PLAYER_LEVELUP
    volume: 1.0
    pitch: 1.2
  item_reveal:
    sound: BLOCK_NOTE_BLOCK_PLING
    volume: 1.0
    pitch: 1.5
  market_open:
    sound: ENTITY_ENDER_DRAGON_GROWL
    volume: 0.8
    pitch: 1.0
  market_closed:
    sound: ENTITY_WITHER_DEATH
    volume: 0.8
    pitch: 0.9
  permission_denied:
    sound: BLOCK_NOTE_BLOCK_BASS
    volume: 1.0
    pitch: 0.8

Last updated