zRivals Duels logozRivals Duels

Kits

Saving kits from your inventory, editing them, the kit file, and the kit picker and preview menus.

Kits are saved straight from your own inventory, so building one is as simple as filling your inventory and running one command. Everything on the items is kept: enchantments, names, lore, custom model data, attributes and items from other plugins such as ItemsAdder.

The six row kit preview menu with the main inventory in slots 0 to 26, the hotbar in 27 to 35, armour in 36 to 39, the offhand in 40, and settings, close and effects buttons in slots 47, 49 and 51.

Creating a kit

Fill your inventory

Put the kit items in your inventory, armour slots and offhand, exactly where players should get them.

Save it

/duel kit create <name>

Kit names use lower case letters, digits, - and _. The kit is saved to kits/<name>.yml and shows up in the kit picker straight away.

Dress it up

Hold an item and run /duel kit seticon <name> to use it as the icon, and /duel kit rename <name> <display name> to set a MiniMessage display name. Lore, order and the rules below are edited in the kit file, then applied with /duel admin reload.

Kit commands

All need zrivalsduels.admin.kit. Everything except list must be run in game.

CommandWhat it does
/duel kit create <name>Save your inventory, armour and offhand as a new kit
/duel kit update <name>Replace the kit's items with your inventory. Display settings are kept
/duel kit delete <name>Delete a kit. Asks you to run the confirm command shown in chat within 30 seconds
/duel kit load <name>Put the kit into your inventory to edit it. Your own inventory is saved first
/duel kit restoreGive back the inventory saved by kit load
/duel kit seticon <name>Use the item in your main hand as the kit icon
/duel kit rename <name> <display name>Set the display name, MiniMessage format
/duel kit preview <name>Open the read only preview menu
/duel kit listList every kit with its ranked and permission settings. Click a line to preview

To edit a kit: /duel kit load <name>, change the items, /duel kit update <name>, then /duel kit restore to get your own inventory back.

If you delete a kit that a setup menu has selected, the selection is cleared and both players are told.

The kit file

# Name shown in menus and messages, MiniMessage format
display-name: "<gold>Example"
# Lines shown under the kit name in the kit picker, MiniMessage format
lore:
  - "<gray>A simple starter kit."
# Icon material in the kit picker, used when icon-item is empty
icon: IRON_SWORD
# Saved icon item, set in game with the kit seticon command, leave empty to use the icon material
icon-item: ""
# Position in the kit picker, lower numbers come first
order: 0
# When true only players with zrivalsduels.kit.<kit name> can pick this kit
permission-required: false
# Allow this kit in ranked duels
ranked-allowed: true

# Rules that apply while this kit is used
settings:
  no-hunger: false
  regeneration: true
  allow-block-place: false
  allow-block-break: false
  max-health: 20.0

# Effects given when the duel starts
potion-effects: []
KeyWhat it doesDefault
display-nameName in menus and messages<gold> plus the kit name
loreLines under the name in the kit pickerempty
iconIcon material, used when icon-item is emptyIRON_SWORD
icon-itemA saved icon item, written by /duel kit seticon. Do not edit by handempty
orderPosition in the picker, lower first. Ties sort by name0
permission-requiredWhen true, only players with zrivalsduels.kit.<name> see and use itfalse
ranked-allowedWhether the kit can be used in ranked duelstrue
settings.no-hungerKeep the hunger bar from droppingfalse
settings.regenerationNatural health regeneration from a full hunger bar. false turns it offtrue
settings.allow-block-placeLet players place blocks, only inside the arena's combat regionfalse
settings.allow-block-breakLet players break blocks, only inside the arena's combat regionfalse
settings.max-healthMaximum health during the duel. 20.0 is ten hearts20.0
potion-effectsEffects given when the fight begins, see belowempty
itemsThe saved items. Written by create and update, do not edit by hand

Potion effects

Each entry has an effect (the Minecraft effect name), an amplifier (0 is level 1) and duration-seconds (-1 lasts the whole duel):

potion-effects:
  - effect: speed
    amplifier: 0
    duration-seconds: -1
  - effect: strength
    amplifier: 1
    duration-seconds: 30

An unknown effect name is skipped with a console warning.

The example kit

The shipped example kit has no saved items. Instead it has a starter-items list that gives an iron sword, a bow, food, arrows and iron armour, so the kit menu works on a fresh install. The first /duel kit update example replaces the starter items with your saved inventory. Kit files you create yourself never use starter-items.

Own gear

own-gear is a reserved kit name. It is the built in choice for duels where players fight with their own items, set by the Gear button in the setup menu and the own-gear section of config.yml. It is never listed in the kit picker or the queue, and /duel kit create own-gear is refused. Add own-gear to an arena's allowed-kits list to allow it in an arena that limits kits.

The kit picker

Opened from the kit button in the setup menu. It shows only kits both players can use, and in ranked only kits with ranked-allowed: true.

  • Left click selects a kit.
  • Right click opens the preview, closing it returns to the picker.

The layout is in menus/kit-select.yml and the preview in menus/kit-preview.yml, see Menus.

Kit items are always found

Every item a kit gives is tagged with the id of the duel. When the duel ends, every tagged item is removed before the player's own inventory goes back. When a player joins, their inventory and ender chest are scanned and any leftover duel item is removed. Dropped duel items cannot be picked up by anyone outside that duel.

On this page