Skip to main content

Custom Menus

BTCMobs includes a powerful menu system for in-game administration and browsing of mobs, items, and spawners.

Opening Menus

Menus can be opened with the /btc menu command:
/btc menu              # Opens the main menu
/btc menu open <name>  # Opens a specific menu

Available Menus

MenuDescription
mainMain navigation hub with access to all sub-menus
mob-browserPaginated list of all registered mobs
item-browserPaginated list of all registered items
spawner-browserPaginated list of all spawners
mob-editorEdit mob properties (view, spawn, kill)
item-editorEdit item properties (get, give)
spawner-editorEdit spawner settings
configPlugin configuration options
color-pickerColor selection utility for customization

Dynamic Content

Browser menus automatically populate with real data from the plugin:
  • Mob Browser: Shows all registered mobs with active instance counts
  • Item Browser: Displays all custom items with their actual icons
  • Spawner Browser: Lists all spawners with their current status

Pagination

Large lists are automatically paginated. Use the Previous Page and Next Page buttons to navigate.

Quick Actions

Click on items in browsers to perform quick actions:
  • Mobs: Left-click to spawn, right-click to kill all instances
  • Items: Click to receive the item
  • Spawners: Left-click to force spawn, right-click to toggle active state

Creating Custom Menus

You can create custom menus by placing YAML files in the plugins/btcMobs/menus/ directory.
Menu:
  Display: "<bold>My Custom Menu"
  Size: 27  # Must be a multiple of 9 (9, 18, 27, 36, 45, 54)
  DataProvider: mobs  # Optional: mobs, items, spawners
  Schema:
    - "0 0 0 0 0 0 0 0 0"
    - "0 M M M M M M M 0"
    - "0 0 0 B 0 N 0 0 0"
  Icons:
    BORDER:
      Mapping: "0"
      Material: BLACK_STAINED_GLASS_PANE
      Display: " "
    MOB_SLOT:
      Mapping: M
      Material: BARRIER
      Display: "<gray>Empty"
      Dynamic: true  # Filled by DataProvider
    BUTTON_BACK:
      Mapping: B
      Material: ARROW
      Display: "<red>Back"
      Actions:
        - "open: main"
    BUTTON_NEXT:
      Mapping: N
      Material: PAPER
      Display: "<yellow>Next Page"
      Actions:
        - "nextpage: my-menu"

Icon Properties

PropertyDescriptionExample
MappingCharacter used in SchemaM
MaterialBukkit material typeDIAMOND_SWORD
DisplayDisplay name (supports MiniMessage)<gold><bold>My Item
LoreList of lore linesSee below
ModelCustom model data100
ActionsList of click actionsSee below
DynamicMark as dynamic slot for DataProvidertrue

Available Actions

ActionDescriptionExample
open: <menu>Open another menuopen: item-browser
closeClose the current menuclose
command: <cmd>Execute command as playercommand: btc mobs spawn zombie
console: <cmd>Execute command as consoleconsole: give <player> diamond 1
message: <msg>Send message to playermessage: <green>Hello!
nextpage: <menu>Go to next pagenextpage: mob-browser
prevpage: <menu>Go to previous pageprevpage: mob-browser

Placeholders

PlaceholderDescription
<page>Current page number (1-indexed)
<totalPages>Total number of pages
<currentPage>Alias for page
<totalItems>Total items in the data provider
<player>Player name (in console commands)

Data Providers

ProviderDescription
mobsProvides all registered mob types
itemsProvides all registered custom items
spawnersProvides all configured spawners