shops
The rotating shard shop in shops/ - rotation, menu layout, flash icons, item format and item pool.
Each shop is one file, shops/<id>.yml, and the file name is the shop id. The default is
shards.yml. /shardshop and /afkzone shop open the shop named by Shop.Default-Shop in
config.yml. After editing, run /afkzoneadmin reload.
A walkthrough is in Setting Up the Shard Shop.
Settings: Permission: "" Rotation: Enabled: true Interval: 86400 Slots: 7 Announce: true
Menu: Title: "Shard Shop" Size: 36 Item-Slots: [11, 12, 13, 14, 15, 20, 21, 22, 23, 24] Items: Filler-Item: Material: BLACK_STAINED_GLASS_PANE Slots: [0-10, 16-19, 25-35] Name: "&r" Rotation-Item: Material: CLOCK Slot: 4 Name: "&d&lNext Rotation" Lore: - "&7The items in this shop rotate" - "&7on a timer, check back often." - "" - "&5 - &7Next Rotation: &f{time}" Balance-Item: Material: AMETHYST_SHARD Slot: 35 Name: "&d&lYour Shards" Lore: - "&7Earn shards by staying AFK" - "&7inside an AFK zone." - "" - "&5 - &7Balance: &f{shards} {currency}" - "" - "&7Ranks and shard boosters" - "&7multiply what you earn." Temporary-Icons: Insufficient-Funds: Material: BARRIER Name: "&c&lError!" Lore: - "&7You don't have enough shards for this!" Limit-Reached: Material: BARRIER Name: "&c&lError!" Lore: - "&7You have reached the limit for this item!"
Item-Format: Name: "&d&l{name}" Lore: - "&8Shard Shop" - "" - "&dInformation:" - "&5 - &7Price: &f{price} {currency}" - "&5 - &7Stock: &f{stock}x" - " " - "&e➥ Click to purchase!"
Items: diamond_block: Material: DIAMOND_BLOCK Price: 400 Weight: 5.0 Limit: 2 netherite_scrap: Material: NETHERITE_SCRAP Amount: 2 Price: 650 Weight: 3.0 Limit: 1 booster_2x: Material: AMETHYST_SHARD Name: "&d&l2x Shard Booster" Glow: true Lore: - "&7Doubles the shards you earn" - "&7in AFK zones for 1 hour." Price: 800 Weight: 4.0 Limit: 1 Actions: - "afkzoneadmin booster give {player} shard2x 1" fly_1h: Material: FEATHER Name: "&d&l1 Hour of Flight" Glow: true Lore: - "&7Fly anywhere on the server" - "&7for one hour." Price: 1000 Weight: 2.0 Limit: 1 Actions: - "[message] &5[&d&lAFK&5] &7Flight enabled for 1 hour." - "lp user {player} permission settemp essentials.fly true 1h"The shipped file has ten items: diamond_block, netherite_scrap, enchanted_golden_apple,
elytra, totem, shulker_box, xp_bottles, golden_carrots, booster_2x and fly_1h. The
fly_1h item uses LuckPerms and EssentialsX commands; change it if you run other plugins.
Settings
Section titled “Settings”Required, including Rotation.
| Key | Default | Description |
|---|---|---|
Permission |
"" |
Node required to open this shop. Empty means anyone with optimalafkzone.shop. |
Rotation.Enabled |
true |
true stocks a weighted selection that changes on a timer. false stocks every item, always. |
Rotation.Interval |
86400 |
Seconds between rotations (86400 = 24 hours). Minimum 1. |
Rotation.Slots |
7 |
How many different items each rotation stocks. Capped at the number of Item-Slots (a larger value logs a warning). |
Rotation.Announce |
true |
Broadcast SHOP-ROTATED when the shop rotates on its timer. |
Each rotation draws Slots distinct items by Weight, and resets every player’s purchase counts for
this shop. The current rotation is saved in the database, so a restart keeps the stock and the
countdown. A rotation that came due while the server was offline happens on startup.
Required. The shop’s menu layout.
| Key | Default | Description |
|---|---|---|
Title |
&5&lShard Shop |
Menu title. |
Size |
54 |
Inventory size, a multiple of 9 between 9 and 54. |
Item-Slots |
- | Required. The slots stocked items are placed in, in order. Numbers or a-b ranges, all inside Size. |
Items |
- | Decoration and buttons, see below. |
Temporary-Icons |
- | Flash icons, see below. |
Each entry under Menu.Items is an item definition plus Slot: (one number) or Slots: (a list of
numbers and a-b ranges). The entry names are free-form. When entries share a slot, the one with
fewer slots wins, so a full-size filler never covers a button.
Every entry renders with these tokens:
| Token | Value |
|---|---|
{time} |
Countdown to the next rotation, or Unlimited for a shop that does not rotate. |
{rotation} |
The rotation number. |
{shards} / {currency} |
The viewer’s balance and the matching currency name. |
{player} |
The viewer’s name. |
{page}, {pages}, {results} |
Current page, page count, number of stocked items. |
An entry may have an Actions list, run on click. Besides the
shared actions ([message], [console], [player],
[sound], [close], …), the shop understands [next] and [previous] to turn pages when more
items are stocked than there are Item-Slots. Untagged lines do nothing in a menu.
Temporary-Icons
Section titled “Temporary-Icons”Icons flashed for two seconds in the clicked slot when a click is refused. While a slot is flashing it ignores clicks.
| Key | Flashed when |
|---|---|
Insufficient-Funds |
The player cannot afford the item. |
Limit-Reached |
The player has hit the item’s Limit. |
No-Next-Page / No-Previous-Page |
A page button is clicked with no page in that direction. |
Each is optional and takes the item tokens below. Without an icon nothing flashes, but the FAILURE
sound still plays.
Item-Format
Section titled “Item-Format”Optional. The template every stocked item is shown with in the menu.
| Key | Default | Description |
|---|---|---|
Name |
{name} |
Used as the menu name of items that have no Name of their own. |
Lore |
[] |
Appended below each item’s own lore. |
Item tokens (also available in the item’s own Name and Lore):
| Token | Value |
|---|---|
{name} |
The item’s Name, or its material name (Diamond Block). |
{amount} |
The item’s Amount. |
{price} |
The price, formatted. |
{currency} |
The currency name matching the price. |
{shards} |
The viewer’s balance. |
{limit} |
The Limit, or Unlimited. |
{stock} |
Purchases the viewer has left this rotation, or Unlimited. |
{player} |
The viewer’s name. |
Item-Format only changes how the item looks in the menu. A bought item is handed over with its own
Name and Lore.
Optional, but a shop without items is empty. Each key is the item id; each entry is an item definition plus the shop fields.
| Key | Default | Description |
|---|---|---|
Price |
0 |
Cost in shards. |
Weight |
1.0 |
Odds of being stocked in a rotation, relative to the other items. 0 never stocks the item in a rotating shop. |
Limit |
0 |
Purchases per player per rotation. 0 is unlimited. |
Permission |
"" |
Node required to buy the item. |
Amount |
1 |
Stack size, shown in the menu and given on purchase. |
Actions |
- | If present, these actions run instead of giving the item. They get {item} (the name) and {price} (raw number). Untagged lines run from console. |
A purchase is checked again when it goes through: the item must still be stocked, the player must
have its Permission, be under its Limit and have enough shards. Items that do not fit in the
inventory are dropped at the player’s feet with INVENTORY-FULL.
Item fields
Section titled “Item fields”Shop items, menu entries, flash icons, the wand and booster items all use the same item definition:
| Field | Description |
|---|---|
Material |
Any material name. Resolved through XSeries, so legacy and modern names both work. |
Name |
Display name. |
Lore |
Lore lines. |
Amount |
Stack size (default 1). |
Glow |
true adds an enchant glint. |
Base64 |
Head texture value, for PLAYER_HEAD. |
Custom-Model-Data |
Custom model data for resource packs. |
Item-Model |
Item model key for resource packs. |
Item-Flags |
Bukkit item flags such as HIDE_ATTRIBUTES. |
Enchantments |
Enchantments to apply. |
Unbreakable, Hide-Tooltip, Damage |
Further item options. |
