Skip to content

Kit Menu

Stampede edited this page Nov 13, 2023 · 1 revision

The guide explains configuring the menu (menu.json) file for SkiesKits, which changes how /kits displays

{
  "title": "<dark_gray>Kits",
  "size": 3,
  "kits": {
    "example_kit": {
      "slots": [10],
      "available": {},
      "on_cooldown": {},
      "no_permission": {},
      "max_uses": {},
      "failed_requirements": {}
    }
  },
  "items": {
    "background": {
      "slots": [0,1,2,3,4,5,6,7,8,9,17,18,19,20,21,22,23,24,25,26],
      "item": "minecraft:gray_stained_glass_pane",
      "name": ""
    }
  }
}

Menu Options

Title

The message displayed at the top of the GUI. Uses MiniMessage formatting!

"title": "<dark_gray>Kits"

Size

The number of rows the GUI should contain. Integer value between 1 and 6.

"size": 3

Kits

A map of Kit IDs to Kit configurations that should be displayed in the kits configuration menu. Each entry needs a unique kit id. Remove a definition to make the kit not appear when in that state. See the Kit Options section below.

"kits": {
  "example_kit": {
    "slots": [10],
    "available": {},
    "on_cooldown": {},
    "no_permission": {},
    "max_uses": {},
    "failed_requirements": {}
  }
},

Items

A map of additional items to display in the kits menu. These are displayed before kits, so they can will be overridden by the kits items. Each entry needs its unique string identifier. See the Item Options section below.

"items": {
  "background": {
    "slots": [0,1,2,3,4,5,6,7,8,9,17,18,19,20,21,22,23,24,25,26],
    "item": "minecraft:gray_stained_glass_pane",
    "name": ""
  }
}

Kit Options

These options control how a kit is displayed. Depending on the state of the kit for the player, a different display option will be selected.

"example_kit": {
  "slots": [10],
  "available": {},
  "on_cooldown": {},
  "no_permission": {},
  "max_uses": {},
  "failed_requirements": {}
}

Slots

A list of slots that this item will be inserted into. This value should be between 0 and the (size * 9) - 1. EX: if "size: 3", then between 0 and 26. Defaults to an empty list if not provided.

"slots": [10]

Available

If the kit is available for claiming, this state will be used. See the Item Options section below.

"available": {
  "item": "minecraft:diamond",
  "name": "<green><b>Example Kit",
  "lore": [
    "<white><i>My example kit's description!",
    "",
    " <gold>- <gray>Uses: <white>%kit_uses%<gray>/<white>%kit_max_uses%",
    " <gold>- <gray>Cooldown: <white>%kit_cooldown%",
    " <gold>- <gray>Time Remaining: <white>%kit_time_remaining%",
    "",
    "<green><b>AVAILABLE <gray><i>(Click to claim this kit)"
  ]
}

On Cooldown

If the kit is on a cooldown, this state will be used. See the Item Options section below.

"on_cooldown": {
  "item": "minecraft:diamond",
  "name": "<red><b>Example Kit",
  "lore": [
    "<white><i>My example kit's description!",
    "",
    " <gold>- <gray>Uses: <white>%kit_uses%<gray>/<white>%kit_max_uses%",
    " <gold>- <gray>Cooldown: <white>%kit_cooldown%",
    " <gold>- <gray>Time Remaining: <white>%kit_time_remaining%",
    "",
    "<red><b>ON COOLDOWN"
  ]
}

No Permission

If the player does not have permission for this kit, this state will be used. See the Item Options section below.

"no_permission": {
  "item": "minecraft:diamond",
  "name": "<red><b>Example Kit",
  "lore": [
    "<white><i>My example kit's description!",
    "",
    " <gold>- <gray>Uses: <white>%kit_uses%<gray>/<white>%kit_max_uses%",
    " <gold>- <gray>Cooldown: <white>%kit_cooldown%",
    " <gold>- <gray>Time Remaining: <white>%kit_time_remaining%",
    "",
    "<red><b>NO PERMISSION"
  ]
}

Max Uses

If the kit has reached the maximum uses, this state will be used. See the Item Options section below.

"max_uses": {
  "item": "minecraft:diamond",
  "name": "<red><b>Example Kit",
  "lore": [
    "<white><i>My example kit's description!",
    "",
    " <gold>- <gray>Uses: <white>%kit_uses%<gray>/<white>%kit_max_uses%",
    " <gold>- <gray>Cooldown: <white>%kit_cooldown%",
    " <gold>- <gray>Time Remaining: <white>%kit_time_remaining%",
    "",
    "<red><b>MAX USES"
  ]
}

Failed Requirements

If any of the kit requirements listed have failed, this state will be used. See the Item Options section below.

"failed_requirements": {
  "item": "minecraft:diamond",
  "name": "<red><b>Example Kit",
  "lore": [
    "<white><i>My example kit's description!",
    "",
    " <gold>- <gray>Uses: <white>%kit_uses%<gray>/<white>%kit_max_uses%",
    " <gold>- <gray>Cooldown: <white>%kit_cooldown%",
    " <gold>- <gray>Time Remaining: <white>%kit_time_remaining%",
    "",
    "<red><b>REQUIREMENTS NOT MET"
  ]
}

Item Options

These are the definitions for an item being displayed in the GUI

{
  "item_1": {
    "item": "minecraft:diamond_sword",
    "slots": [0],
    "count": 1,
    "name": "<blue><b>Example Sword",
    "lore": ["<gray><italic>Example lore!"],
    "nbt": {
      "Enchantments": [
        {
          "lvl": 3,
          "id": "minecraft:unbreaking"
        }
      ],
      "HideFlags": 1
    }
  }
}

Item (required)

An item identifier (combination of modid:itemid). This can be any item, vanilla or modded. Unknown item stacks will default to minecraft:air.

"item": "minecraft:stone"

Slots

A list of slots that this item will be inserted into. This value should be between 0 and the (size * 9) - 1. EX: if "size: 3", then between 0 and 26. Defaults to an empty list if not provided.

"slots": [0, 1, 7, 8]

Amount

The amount of this item that should be displayed in each slot. Defaults to 1 if not provided.

"amount": 10

Name

The name to override the item with. Defaults to the item's normal name if not provided. Uses MiniMessage formatting!

"name": "<red>Example Stone"

Lore

A list of lore to override the item with. Defaults to an empty list if not provided. Uses MiniMessage formatting!

"lore": [
  "<gray>Example Line 1",
  "<gray>Example Line 2"
]

NBT

An NBT Compound that is set onto the item. This follows the same formatting as applying NBT to an item via /give. No additional NBT is applied if not provided.

"nbt": {
  "Enchantments": [
    {
      "lvl": 3,
      "id": "minecraft:unbreaking"
    }
  ],
  "HideFlags": 1
}
Clone this wiki locally