Skip to content

Module Join Items

j-gaertig-co-dev edited this page Aug 13, 2026 · 2 revisions

Join Items Module

Config file: modules/joinitems.yml — current version: 1.1view current default on GitHub Enable via config.ymlmodules.joinitems: true

⚠ In an upcoming version, every item under items: gets its own enabled: true/false flag (defaulting to false in the shipped example config). Reason: previously, simply flipping modules.joinitems: true on immediately gave every player the 5 example items in slots 0/2/4/6/8 — overwriting whatever was already there. Check the Releases page; if you're on that version, you now set enabled: true per item you actually want live.

Features

  • Automatically gives a configurable set of items to every player when they join.
  • Each item has its own inventory slot, material, MiniMessage name and lore, and a list of commands run (as the player) when they click it.
  • Supports custom player-head skulls (skull-owner, supports %player% for "give the clicking/joining player their own head").
  • Per-item protection flags so these items can't be misused like normal inventory items.
  • settings.op-bypass lets OPs skip the item-giving (and its protections) entirely.
  • No commands — purely event-driven on PlayerJoinEvent.

Protection flags

Each item's flags: list supports any combination of:

Flag Effect
no-drop Item can't be dropped (Q or drag-out-of-inventory).
no-inventory-move Item can't be moved within the player's own inventory.
no-creative-move Blocks the creative-mode quick move/middle-click duplicate exploit.
no-drag Item can't be moved via the drag/paint inventory action.
no-swap Item can't be swapped with another item (e.g. hotbar swap, offhand swap).
re-give-after-/clear Item is automatically re-given if a /clear removes it.
re-give-after-death Item is automatically re-given after the player respawns from death.

Configuration (modules/joinitems.yml)

items:
  spawn-teleporter:
    slot: 0
    material: RED_BED
    name: "<red><bold>Spawn <gray>(Click)"
    lore:
      - "<gray>Teleports you back"
      - "<gray>to the spawn."
    commands:
      - "spawn" # run as the player when clicked; requires the Spawn module
    flags:
      - "no-drop"
      - "no-inventory-move"
      - "no-creative-move"
      - "no-drag"
      - "no-swap"
      - "re-give-after-/clear"
      - "re-give-after-death"

  profile:
    slot: 4
    material: PLAYER_HEAD
    name: "<yellow>Your Profile<gray>(Click)"
    lore:
      - "<gray><bold>Click for stats!</gray>"
    skull-owner: "%player%" # the head shows the joining player's own skin
    commands:
      - ""
    flags: [no-drop, no-inventory-move, no-creative-move, no-drag, no-swap, "re-give-after-/clear", re-give-after-death]

settings:
  op-bypass: false
  • Item keys (spawn-teleporter, profile, ...) are just internal identifiers — name them however you like, and add or remove as many items as you want.
  • slot is the hotbar/inventory slot index (0-35 for the full inventory, 0-8 for the hotbar row).
  • Every item is internally tagged with a persistent-data-container key so PlainBase can reliably tell "one of my join items" apart from a player's regular items, even after inventory moves.

Clone this wiki locally