Internal Store Menu
About 414 wordsAbout 1 min
The internal store menu is defined in plugins/MyCompany/menu/internal_store.yml, and its texts are in the language file under menu.internal-store.
Default layout
menu/internal_store.yml
size: 54
items:
# default for all empty slots
default:
material: AIR
submit:
material: EMERALD
slot: 49
back_to_main:
material: NETHER_STAR
slot: 45
bar:
material: BLACK_STAINED_GLASS_PANE
slots:
- 46
- 47
- 48
- 50
- 51
- 52
- 53The seven bar slots and the back button frame the bottom row. The submit button sits in the middle of them. All other slots are empty and are the place where players put the items they want to sell.
Texts
The title and the button texts are defined in the language file:
lang/en.yml
menu:
internal-store:
title: 'Internal Store'
items:
submit:
display_name: '&aSubmit'
lore:
- ''
- '&7Submit the item to the internal store'
- '&7The company will receive &e%money%'
- '&7for the items.'
- '&7Additionally, you will receive &e%price%'
- '&7of the money as the share.'
- ''
bar:
display_name: '&7'
back_to_main:
display_name: '&aBack to main menu'Placeholders available in the menu items:
| Placeholder | Value |
|---|---|
%money% | The total amount the company will receive for the items currently in the menu |
%price% | The seller's personal share of that total |
%player% | The player's name |
%company% | The company name |
%position% | The player's position in the company |
Despite the names, %money% is the company amount and %price% is the player share. Both are recalculated whenever items are added to or removed from the menu.
The menu title also supports %company%.
Behavior
- A player can put items into any free slot of the menu.
- The prices and the two totals update after every item move or drag.
- Submit removes only the items that have a price and pays the company and the seller.
- Closing the menu returns every remaining item to the player, including items that could not be priced. Leave enough room in the inventory for the returned items.
- The store has no position permission; any member of the company can open and sell.
- Clicking the bar plays a glass break sound; it has no other effect.
Editing the menu
- Keep
submit,back_to_mainandbarinsidesize, and do not give two items the same slot. defaultis the item placed in every empty slot.AIRleaves the slots empty for selling.- Color codes with
&are supported. - The menu is loaded at startup.
/myc reloadre-reads menu files and language texts; a restart also works.
The prices themselves are described in Internal Store Configuration.