Skip to content

Shop

Requires the “Cobaltia” plugin

/boutique opens a menu shop fully described in boutique.yml. Payments are taken from the currencies of the Cobaltia server core plugin: gems (gems), coins (coins) and farm points (farm_points). Without that plugin, the command answers “Shop unavailable”.

  1. Home — the categories, placed in the slots of your choice, and a “Your balance” button showing the player’s three currencies.
  2. Category — up to 45 items per page, with pagination, back and close buttons. Each item shows its price; an already owned item glows and says “Already owned”.
  3. Confirmation — the item, its price and a “Confirm” button. When the item has two prices, two buttons let the player choose the currency (“Pay with gems” / “Pay with coins”).
  4. Payment — the amount is withdrawn, then the item commands run from the console. The player gets “Purchase complete” with a sound.
boutique.yml
boutiques:
gemmes:
titre: Boutique # home menu title
monnaie-principale: gems # currency shown first: gems, coins or farm_points
categories:
animations:
nom: <#C77DFF>Animations de pseudo # MiniMessage
icone: NAME_TAG # material or nexo:<id>
slot: 22 # slot in the home menu (0-53)
description:
- <gray>Effets animés sur ton pseudo.
articles:
animation_eclat:
categorie: animations
nom: Éclat Cobalt
icone: LAPIS_LAZULI
prix:
gems: 500 # example value
commandes:
- effets give {joueur} eclat
lore:
- <gray>Une lame de lumière traverse ton pseudo.
possede: cobaltia.effet.eclat # already owned when the player has this permission
Field Description
categorie ID of an existing category (required)
nom, icone, lore Menu display (MiniMessage for the lore; icone accepts nexo:<id>)
prix One or two currencies among gems, coins, farm_points, with a strictly positive amount
commandes Console commands run after payment. {joueur} = buyer name
possede Permission that marks the item as “Already owned” and prevents buying it again
par-saison true: can be bought only once per season
booster-aleatoire Sub-section facteur and minutes: starts a booster of a random type
lien Command run by the player on click, instead of a purchase (opens another menu)

An item must have either a lien, or a prix and content (commandes or booster-aleatoire). Otherwise boutique.yml is rejected on startup and the error is shown in the console.

In a command, {hasard:a|b|c} is replaced by one of the values at random, picked at purchase time:

commandes:
- compagnon give {joueur} aleatoire:{hasard:rare|epique}
  • One purchase at a time per player: repeated clicks during a payment are ignored.
  • Ownership (possede) and the per-season limit are checked again at payment time.
  • If the payment fails (insufficient balance, error), nothing is run and the player is told (“Insufficient balance” / “Purchase failed”).
  • If the player disconnects between the withdrawal and the delivery, they are refunded automatically.
  • Every purchase is logged in the console: [boutique] <player> a acheté <item> pour <amount> <currency>.