Shop
/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”.
Purchase flow
Section titled “Purchase flow”- Home — the categories, placed in the slots of your choice, and a “Your balance” button showing the player’s three currencies.
- 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”.
- 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”).
- Payment — the amount is withdrawn, then the item commands run from the console. The player gets “Purchase complete” with a sound.
boutique.yml structure
Section titled “boutique.yml structure”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 permissionItem fields
Section titled “Item fields”| 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.
Advanced features
Section titled “Advanced features”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}booster_aleatoire_60: categorie: boosters nom: Booster individuel aléatoire 1 h prix: gems: 200 booster-aleatoire: facteur: 2 # multiplier minutes: 60 # durationThe type is drawn among the boosters the player does not already have active. When they are all active, the purchase is refused with no charge (“Boosters already active”).
With par-saison: true, the purchase is remembered for the current season (read from the “Cobaltia” plugin season placeholder). A new season reopens the purchase. The history is stored in the player data, with no extra file.
tous_les_boosters: categorie: boosters nom: Tous les boosters icone: nexo:iconic_jobs_boost_coins lien: boosters # the player runs /boostersPurchase safety
Section titled “Purchase safety”- 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>.