Aller au contenu principal

Join Item

Give players custom items when they join

Champs

ChampTypePar défautDescription
itemsList<JoinItem>emptyItems to give when a player joins
JoinItem (8)
ChampTypePar défautDescription
itemVar<Item>—Item to give to the player
slotInt?—Inventory slot to place the item in
nameOverrideString?—Override the item's display namePlaceholders
loreOverrideList<String>?—Override the item's lorePlaceholders
rightClickCommandString?—Command executed on right clickPlaceholders
leftClickCommandString?—Command executed on left clickPlaceholders
permissionString?—Permission required to receive this item
flagsList<ItemFlag>—Special behavior flags for this itemValeurs :SKIP_IF_PRESENTCLEAR_SLOTINVENTORY_MODIFYSELF_DROPSDEATH_DROPSDEATH_KEEPREINSERT_MISSING

How to use it​

Each item has a slot (0 to 8 hotbar, 9 to 35 inventory) and optional nameOverride, loreOverride, rightClickCommand and leftClickCommand (run as the player by default; start with console: to run as the console; {amount} is replaced by the stack size). permission restricts who receives it.

flags decide the behaviour. The default set is INVENTORY_MODIFY (the item cannot be moved), SELF_DROPS (it cannot be dropped) and DEATH_KEEP (it is removed from the death drops and given back at respawn). Other flags: DEATH_DROPS (let it drop on death), SKIP_IF_PRESENT (do not give it if the slot is already taken), CLEAR_SLOT (empty the slot first), and REINSERT_MISSING (give it again if the player loses it). Items are given when a player joins; while an extended GUI menu is open they are restored on close.