GroupeZ Docs
ConfigurationsItems

Item Mechanics

Give custom items behaviour with mechanics such as itemjoin and on-click

Custom items defined in the plugins/zMenu/items/ folder can be given mechanics — reusable behaviours attached to the item. Each item is identified by an id (its YAML key), which zMenu stores on the item so the mechanic can recognise it later.

Item File Structure

# plugins/zMenu/items/default-items.yml
<item-id>:
  name: "&aMy Item"          # standard zMenu item format (see Item Configuration)
  lore:
    - "&7A special item"
  mechanics:
    <mechanic-id>:
      # options depend on the mechanic

itemjoin

The itemjoin mechanic controls when the item is granted and how it is protected in the player's inventory. It is registered by default, so it works out of the box.

server-guide:
  material: FILLED_MAP
  name: "&eServer Guide"
  lore:
    - "&7Everything you need to get started."
  mechanics:
    itemjoin:
      give-first-join: true
      fixed-slot: 8
      prevent-inventory-modification: true

Options

OptionTypeDefaultDescription
give-first-joinBooleanfalseGive the item automatically the first time a player ever joins the server.
fixed-slotInteger-1Force the item into this inventory slot when given, and lock it there. -1 disables it; valid range is 0–36.
prevent-inventory-modificationBooleantruePrevent the item from being dropped, moved, dragged, swapped to the off-hand or placed in an item frame.

prevent-inventory-modification only takes effect when a fixed-slot is set — the protection is tied to the locked slot. Without a fixed-slot, the item can be moved freely even if this option is true.

Use give-first-join together with a fixed-slot to hand every new player a guide/menu item that stays pinned to their hotbar.

on-click

The on-click mechanic runs zMenu actions when the player left- or right-clicks while holding the item in their main hand.

on-click is not registered by default in the current build. It only works if an addon registers it through the API (ItemManager#registerMechanicFactory); otherwise an on-click block logs a "No MechanicFactory found" warning. The default built-in mechanic is itemjoin.

magic-wand:
  name: "&dMagic Wand"
  material: BLAZE_ROD
  mechanics:
    on-click:
      cooldown: 3
      cancel-event: true
      click-target: both
      click-types:
        - RIGHT
        - SHIFT_RIGHT
      click-requirements:
        1:
          requirements:
            - type: permission
              permission: "server.wand"
              deny:
                - type: message
                  messages:
                    - "&cYou can't use this wand."
      actions:
        - type: message
          messages:
            - "&dPoof! ✨"
        - type: player-command
          commands:
            - "spawn"

Options

OptionTypeDefaultDescription
cooldownInteger0Seconds between activations, per player (0 = no cooldown)
cancel-eventBooleanfalseCancel the interaction (e.g. to stop block placement / item use)
click-targetStringbothWhere the click must happen: air, block, or both
click-typesList—Which clicks trigger it: LEFT, RIGHT, SHIFT_LEFT, SHIFT_RIGHT (sneaking uses the SHIFT variants)
click-requirementsSection—Standard zMenu requirements checked on click
actionsList—Standard zMenu actions run on click

on-click fires from a PlayerInteractEvent on the main-hand item. Because no inventory is open, inventory-specific placeholders are not available inside the requirements/actions.

Next Steps

On this page

GroupeZ MCP

Documentation in your AI

MCP lets your AI search GroupeZ documentation and read current examples to help you configure your plugins.

Read-only · No documentation API key needed

1. Copy the server URL

Transport: HTTP (Streamable HTTP). Authentication: none. Your tool uses its own model and subscription limits.

  1. Open Plugins in ChatGPT on the web, then + → Add custom MCP server.
  2. Name it ‘GroupeZ Documentation’, paste the URL above and choose ‘No authentication’. Create and install the plugin.
  3. In a conversation, type @ and select the plugin before asking. If needed, enable search, get_page and list_pages in its settings.
Official setup guide

3. Ask a question

Use GroupeZ MCP to help me create a zMenu inventory. Search relevant pages, read the examples and cite your sources.
Other clients and troubleshooting

For clients using mcpServers, adapt this example to their format:

{
  "mcpServers": {
    "groupez-docs": {
      "url": ""
    }
  }
}

Available tools are search, get_page and list_pages. Refresh the connector’s tools after updates. If your AI cannot access them, check that the connector is enabled in the conversation and your account allows custom MCP servers. Opening the URL in a browser is not an MCP test.