LobbyItems

Shared lobby items for all minigames.

Provides a green concrete block ("Start Game") and a red concrete block ("Leave Game") that players receive in the lobby phase. Games with manual start listen for the start item via isStartItem; the leave item is handled centrally via handleLeaveItem.

Functions

Link copied to clipboard
fun giveAllItems(player: ServerPlayer)

Gives the player both the start and leave lobby items.

Link copied to clipboard
fun giveLeaveItem(player: ServerPlayer)

Gives the player only the leave item (for lobbies with auto-countdown).

Link copied to clipboard
fun giveStartItem(player: ServerPlayer)

Gives the player the start item in their main hand.

Link copied to clipboard
fun handleLeaveItem(player: ServerPlayer, hand: InteractionHand): Boolean

Checks whether the player is holding the leave item and, if so, removes them from the game.

Link copied to clipboard
fun isLeaveItem(stack: ItemStack): Boolean

Returns true if the given item stack is the "Leave Game" item.

Link copied to clipboard
fun isStartItem(stack: ItemStack): Boolean

Returns true if the given item stack is the "Start Game" item.