Order Configuration
About 660 wordsAbout 2 min
Orders are defined in plugins/MyCompany/orders.yml. The file is generated on the first start if it does not exist, and it is read when the server starts.
File structure
stone_breaker:
label: 'Stone Breaker'
description:
- '&7We receive a job'
- '&7from the miners.'
quest:
1:
type: break_block
item: stone
amount: 16
reward:
- 'item;diamond;16'
- 'company_income;1500.0'
- 'money;100.0'
- 'experience;10'| Key | Description |
|---|---|
| Order id | The top-level key (stone_breaker). Used by the admin command and stored in player data. Keep it stable. |
label | The name shown in the menu. Supports & color codes. |
description | A list of lore lines shown in the menu. Supports & color codes. |
quest | Required section. Every key below it is one quest that must be completed. |
reward | A list of reward entries paid when the whole order is completed. |
Quests
quest:
quest_id:
type: break_block
item: stone
amount: 16- The quest id (
quest_idabove) is any name. It only needs to be unique inside the order. typeis one of the five quest types. See Quests and Rewards.itemis required bybreak_block,place_blockandfish.mobis required bymob_killandfeed.amountis the target count and must be a positive whole number.
Every quest in the order must be finished. There is no OR group: five quests mean all five must be completed.
Rewards
reward:
- 'item;diamond;16'
- 'company_income;1500.0'
- 'money;100.0'
- 'experience;10'
- 'console_command;say %player% finished the order!'Each entry uses semicolons as separators. The available types and their values are listed in Quests and Rewards.
itempays an item,moneypays the player,experiencepays experience.company_incomeadds the amount to the company balance and counts as company income.console_commandruns a command as the console, with%player%replaced by the player name.- A malformed entry is skipped; the other rewards are still paid.
- The menu reward list shows
item,company_income,moneyandexperience. Commands are executed but are not listed in the menu.
Add an order
- Add a new block under the top level of
orders.yml, using a new id. - Fill in
labelanddescription. - Add at least one quest under
quest. - Add the rewards under
reward. - Restart the server.
/myc reloaddoes not re-readorders.yml. - The order joins the random pool at the next daily refresh.
The plugin assigns 5 random orders per player. This number is fixed; it is not a config option. If the file contains fewer than 5 orders, all of them are assigned. If it contains more, 5 are picked at random.
Remove or rename an order
Player data stores the order id in the daily list and in the progress data.
- If you remove an order that is still in someone's daily list, that entry can fail to render and cannot be completed until the next daily refresh.
- Remove orders shortly before a refresh, or accept that affected players may see a broken entry until the next refresh.
- Renaming an id creates a new order. The old progress is left behind under the old id.
- The safest sequence is to remove or rename an order, restart the server, and let the next refresh build a fresh list.
Validation
- An order without a
questsection fails when it is assigned, because the plugin expects at least one quest. - An unknown
typenever receives progress, so the order can never be completed. Use one of the five documented types. - Material and entity names are Bukkit names. Comparisons are case-insensitive, so
stoneandSTONEboth work. amountis read as an integer. A missing or non-numeric amount counts as0.- The refresh time is configured by
company-funds.cost-per-day.tax-timeinconfig.yml; see Employee Orders.
The order menu layout is described in Menu Configuration. Its texts live under menu.orders in the language file.