Add-ons ๐Ÿ›’ Key Shop

๐Ÿ’ฐ Shop Entries

On this page, you will find how to configure what the key shop sells.

#Entries

Every offer lives under entries in key-shop.yml.

confirm-purchases: false
entries:
  '0':
    identifier: vote_key_single
    display-item:
      material: TRIPWIRE_HOOK
      display-name: '&aVote Key'
      amount: 1
    key: vote
    amount: 1
    cost-engine: VAULT
    currency: ''
    price: 2500.0
    permission: ''
    daily-limit: 5
    total-limit: -1
    purchase-commands: []
    purchase-message:
    - '&aYou bought &fx%amount% %key% &afor &f%price%&a.'

circle-info

Entries are stored as a numbered section rather than a YAML list, the same shape the crate rewards use. The numbers are positions only and have to stay unique inside the section.

#Options

Option What it does
identifier The name the purchase counters are stored under. Renaming it resets every player's limit on that entry.
display-item The item shown in the shop menu.
key The identifier of the key being sold.
amount How many keys one purchase gives.
cost-engine Which currency the price is charged in.
currency The currency id, used only by EXCELLENTECONOMY. Leave empty otherwise.
price What one purchase costs. A price of 0 is free and skips the currency check entirely.
permission The player needs this to buy the entry. Leave empty for everyone.
daily-limit Purchases allowed per player per day, -1 for unlimited.
total-limit Purchases allowed per player for the lifetime of the entry, -1 for unlimited.
purchase-commands Commands run by the console after a purchase.
purchase-message Sent to the buyer.

#Cost engines

Engine Requires Notes
NONE Nothing The entry is free whatever price says.
LEVEL Nothing Charges experience levels, whole numbers only.
VAULT Vault and an economy plugin
PLAYERPOINTS PlayerPoints Whole numbers only.
VOTINGPLUGIN VotingPlugin Charges vote points, whole numbers only.
EXCELLENTECONOMY ExcellentEconomy Set currency to the currency id.

An entry whose engine is not installed shows as unavailable in the menu rather than failing on click.

#Limits

The daily counter resets at midnight UTC, and it resets for a player who stays online across the boundary as well as one who logs in after it. Both limits apply at once, so an entry with a daily limit of 2 and a total limit of 10 allows two per day up to ten in total.

/crate resetKeyShop <player> clears both counters for that player.

#Confirmation

confirm-purchases at the top of the file turns every purchase into two clicks. The first click arms the entry and swaps its icon to the confirm-item layout, and a second click within five seconds completes the purchase. Anything else โ€” waiting out the five seconds, or closing the menu โ€” cancels it.

circle-info

The armed state lives with the open menu, so it is per player and disappears when they close the shop.

#Message placeholders

purchase-message accepts %player%, %amount%, %key%, %entry% and %price%.

purchase-commands accept %player% along with any PlaceholderAPI placeholder.

The entry-item, confirm-item and unavailable-item entries in menus/default_key_shop.yml accept:

Placeholder Value
%entry% The display name of the entry.
%item_name% The name of the configured display item.
%key% The display name of the key being sold.
%amount% How many keys the purchase gives.
%price% The price, formatted by the cost engine.
%remaining% Purchases the player has left, or the "Unlimited" label.
Last updated 9 days ago
My Cart (0 items)

Oops... looks like the spiders padded through here

Add products to your cart and remove them from here Lets buy