Add documentation for saved items.

Andreas Troelsen 2023-11-13 13:04:42 +01:00
parent fcf6fa90a9
commit e7f63046ca
3 changed files with 31 additions and 0 deletions

@ -48,3 +48,6 @@ Only ops (and the console, if it makes sense) can issue these commands. They inc
* `/ma classchest <class>` - While looking at a chest, link the chest to the given class as a [[linked class chest|Class Chests]]. Linking a class chest means MobArena will always copy the items from the linked chest, regardless of any local class chests in arena lobbies. This is useful if you want a global class chest for a class.
* `/ma auto-generate <arena>` - Auto-generate a new arena with the given name. The arena will be generated just below the player in the world they are standing in.
* `/ma auto-degenerate <arena>` - Degenerate the arena with the given name, effectively restoring the patch that was "bulldozed" with the auto-generator.
* `/ma load-item <identifier>` - Load the saved item named `<identifier>` into your hand.
* `/ma save-item <identifier>` - Save the currently held item as `<identifier>` for use in the config-file.
* `/ma delete-item <identifier>` - Delete the saved item named `<identifier>`.

@ -3,6 +3,7 @@
Internally, MobArena works with what it calls _Things_. Things can essentially be anything, but the core plugin supports the following Things:
- [Minecraft items](#items)
- [Saved items](#saved-items)
- [Economy money](#economy-money)
- [Commands](#commands)
- [Permissions](#permissions)
@ -67,6 +68,30 @@ By adding enchantments to an **enchanted book** item, the enchantments are store
- The potion prefixes `long_` and `strong_` are not supported on Minecraft versions prior to 1.13.
- Splash potions are always called `splash_potion` in MobArena, even in builds for Minecraft 1.8.
# Saved Items
- Syntax: `<identifier>` or `<identifier>:<amount>`
- Use in: Class items/armor, rewards, upgrade waves, supply waves, boss waves, entry fees
For more complex items with lore and NBTs, it might be easier to just _save_ an in-game item to disk and reference it.
To save the currently held item, use `/ma save-item <identifier>`, where `<identifier>` is a unique name (note that this command will overwrite existing saved items if the names clash).
Use the `/ma load-item <identifier>` command to load an already saved item (overwrites whatever is currently held), and the `/ma delete-item <identifier>` command to delete saved items.
Saved items are denoted by their **identifier** as defined by the `/ma save-item` command, and the identifiers follow the same naming convention as normal Minecraft item names.
It is possible to override the **amount** of a saved item in the same way amounts are denoted on normal Minecraft items.
### Examples
| Syntax | Result |
| ------ | ------ |
| `cool_shield` | The item held when running `/ma save-item cool_shield` |
| `bad_sword` | The item held when running `/ma save-item bad_sword` |
### Notes
- Saved items rely on the [ConfigurationSerializable](https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/configuration/serialization/ConfigurationSerializable.html) functionality in the Bukkit API, which means it inherits all of its features and limitations.
- Saved items take precedence over normal Minecraft items, which means it is possible to _override_ the meaning of `dirt` in the config-file. With great power comes great responsibility.
# Economy Money
- Syntax: `$<amount>` or `money:<amount>`

@ -172,6 +172,9 @@ Parent node: `mobarena.setup`
| `/ma classchest` | `mobarena.setup.classchest` |
| `/ma listclasses` | `mobarena.setup.classes` |
| `/ma autogenerate` | `mobarena.setup.autogenerate` |
| `/ma load-item` | `mobarena.setup.loaditem` |
| `/ma save-item` | `mobarena.setup.saveitem` |
| `/ma delete-item` | `mobarena.setup.deleteitem` |
#### 5.4. LuckPerms Example