Commands

Items and inventory backups

modules/items.yml

Command Permission
/give [player] <item> [amount] [meta] chorus.items.give
/more [amount] chorus.items.more
/hat chorus.items.hat
/skull [player] chorus.items.skull
/itemname <text> chorus.items.itemname
/lore <add|set|remove|clear> chorus.items.lore
/enchant <enchantment> [level] chorus.items.enchant
/unbreakable chorus.items.unbreakable
/glow chorus.items.glow
/condense chorus.items.condense
/stack chorus.items.stack
/clearinventory [player] chorus.items.clearinventory
/restore [player] [list|number] chorus.items.restore.view
/exp <show|give|take|set|reset> [player] [amount] chorus.items.exp
/itemdb [item] chorus.items.itemdb
/recipe [item|hand] [number] chorus.items.recipe
/book [author|title] [text] chorus.items.book
/firework <...> chorus.items.firework
/potion <effect> [level] [seconds] chorus.items.potion
/editsign <set|clear|copy|paste> chorus.items.editsign

/give#

Hands out items by name, to yourself when no player is given. Anything that does not fit drops at their feet.

/give Notch diamond_sword 1 name:Excalibur lore:Forged_in_the_End enchant:sharpness:5 unbreakable
Word What it does
name: The display name. Underscores become spaces.
lore: The lore. | starts a new line.
enchant:<name>:<level> An enchantment. Level 0 takes one off.
unbreakable Never wears out.
glow The enchanted shimmer without an enchantment behind it.
hide Hides every tooltip line the game adds.
durability:<n> How much use is left.
colour:<r,g,b> Leather armour. #ff0000 works too.
owner:<player> Whose head it is.
amount:<n> How many.

Colour codes in name: and lore: need chorus.items.format; without it the text is used exactly as typed.

A word that means nothing is reported and skipped rather than refusing the whole item. Somebody getting a diamond sword without the lore they typed is a better outcome than getting nothing and having to work out which of eight words was wrong.

Giving to somebody else needs chorus.items.give.others.

What may be handed out#

items:
  restrictions:
    blocked-items: [ ]
    permission-per-item: false
    blocked-enchantments: [ ]
    permission-per-enchantment: false
    unsafe-enchantments: true

Every one of these is off as it ships, so a server that never opens the section behaves exactly as it did before.

Setting What it does
blocked-items Items nobody may bring into the world with /give or /more.
permission-per-item Every item also needs chorus.items.give.item.<name>, for example chorus.items.give.item.diamond_sword.
blocked-enchantments Enchantments nobody may put on, by Minecraft id: mending, silk_touch.
permission-per-enchantment Every enchantment also needs chorus.items.enchant.<id>.
unsafe-enchantments false caps /enchant at the level the game allows, even for somebody holding chorus.items.enchant.unsafe.

chorus.bypass.restrictions is above all of them.

A blocked item never appears in the tab completion, so nobody is offered something they will be refused. /more is covered because one of a blocked item is otherwise all it takes to have a stack of them.

Kits are deliberately not checked. What a kit holds is decided by whoever wrote the kit, not by whoever claims it.

Editing an item#

/itemname and /lore change what you are holding. chorus.items.format allows colour codes and MiniMessage tags; without it the text is used exactly as typed.

items:
  max-lore-lines: 10

/enchant writes enchantments the way the game writes them today — protection, sharpness, unbreaking — and tab completion only offers the ones this version actually has. Level 0 takes one off, and levels beyond the vanilla maximum need chorus.items.enchant.unsafe.

/glow gives an item the enchanted shimmer without an enchantment behind it, and says so rather than hiding the enchantments of an item that already has some.

/stack merges the loose piles in your inventory, matching on name, lore, enchantments and damage, so a renamed sword never disappears into an ordinary one.

/condense#

items:
  condense:
    IRON_INGOT: IRON_BLOCK
    DIAMOND: DIAMOND_BLOCK
    WHEAT: HAY_BLOCK

Nine of the key become one of the value. Only untouched stacks are taken: anything named, enchanted or damaged is left alone, so a mistyped command can never eat a special item.

Fifteen pairs ship. Add your own.

Looking things up#

/itemdb says what the thing in your hand is called, which is the answer to "what do I type in the config for this".

/recipe shows how something is made, datapack recipes included. /recipe <item> 2 steps through the alternatives when there is more than one.

/exp#

Works in points, or in levels when the amount ends in L:

/exp give Notch 5L
/exp set Notch 0
/exp show Notch

On somebody else it needs chorus.items.exp.others.

/editsign#

Writes straight to the block, so a protection plugin does not get a say. It is an operator tool and the default permission says so. A sign that belongs to a shop is refused.

copy and paste move all four lines from one sign to another.

Inventory backups#

A player never loses everything without a copy of it being kept.

backups:
  enabled: true
  keep-days: 14
  keep-per-player: 20
  on:
    death: true
    join: true
    quit: true
    world: true
    clear: true
    kit: true
    manual: true

One is taken when they:

  • die — with what killed them, and who, if it was a player
  • join and leave, so a rollback has both ends of a session
  • change world, named after the world they left
  • are emptied by /clear or by a kit with clear-inventory

Each copy holds the inventory, the ender chest, the experience, the health, the food and where they were.

keep-days: 0 is no age limit; keep-per-player: 0 is no count limit.

/restore#

/restore <player> opens a screen of them, newest first. Clicking one lays that inventory out exactly as it was carried, armour and offhand included, so the decision is made looking at the items rather than guessing.

From there:

Button What it does
Restore inventory Puts those items back
Hand the items over Gives them back without taking away what they carry now. Anything that does not fit drops at their feet
Ender chest Opens the ender chest from the same moment, with its own restore button
Restore everything Inventory, ender chest, experience, health and food

A filter on the bottom row cycles through the reasons that actually have something under them, so forty deaths do not stand between you and the clear you are looking for.

Restoring takes a copy of what it replaces, so restoring the wrong one is itself undoable.

chorus.items.restore.view opens the screens without the restore buttons, for staff who should be able to look into a dispute without being able to hand out diamonds. chorus.items.restore adds them.

The commands still work for anyone who would rather type:

/restore Notch list     what there is, with when, why and who
/restore Notch 3        the third one down, everything

It works on a player who is not online. Nothing can be handed to somebody who is not there, so the restore waits in the database and is applied the moment they log in — and they are told who did it.

The copy keeps the whole item: enchantments, lore, custom model data, another plugin's tags.

The screen#

backups:
  menu:
    rows: 6
    filler: ''
    navigation-filler: GRAY_STAINED_GLASS_PANE
    previous-page: ARROW
    next-page: ARROW
    close: BARRIER

What it says is in menus.yml under menu.backups.

Confirmations#

/clearinventory asks to be run a second time before it empties anything.

Permissions#

Permission Effect
chorus.items.give / .others /give
chorus.items.give.item.<name> Required per item when permission-per-item is on
chorus.items.more /more
chorus.items.hat /hat
chorus.items.skull / .others /skull
chorus.items.itemname /itemname
chorus.items.lore /lore
chorus.items.format Colour codes in /itemname and /lore
chorus.items.enchant /enchant
chorus.items.enchant.<id> Required per enchantment when permission-per-enchantment is on
chorus.items.enchant.unsafe Levels beyond the vanilla maximum
chorus.items.unbreakable /unbreakable
chorus.items.glow /glow
chorus.items.condense /condense
chorus.items.stack /stack
chorus.items.clearinventory / .others /clearinventory
chorus.items.restore.view Looking at backups
chorus.items.restore Putting one back
chorus.items.exp / .others /exp
chorus.items.itemdb /itemdb
chorus.items.recipe /recipe
chorus.items.book /book
chorus.items.book.author Changing the title and author
chorus.items.firework /firework
chorus.items.potion /potion
chorus.items.potion.unsafe Levels beyond what the game brews
chorus.items.editsign /editsign
chorus.bypass.restrictions Ignores the item and enchantment restrictions