跳到主要内容

Join Item

Give players custom items when they join

字段

字段类型默认值描述
itemsList<JoinItem>emptyItems to give when a player joins
JoinItem(8)
字段类型默认值描述
itemVar<Item>—Item to give to the player
slotInt?—Inventory slot to place the item in
nameOverrideString?—Override the item's display name占位符
loreOverrideList<String>?—Override the item's lore占位符
rightClickCommandString?—Command executed on right click占位符
leftClickCommandString?—Command executed on left click占位符
permissionString?—Permission required to receive this item
flagsList<ItemFlag>—Special behavior flags for this item可选值: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.