Paginated Gui Builder
ページネーション付き GUI テンプレートビルダー
player.showPaginatedGui<CustomItem> {
title = "アイテム一覧"
itemsPerPage = 28
items(ItemRegistry.getAllItems())
render { customItem ->
customItem.createItemStack()
}
onItemClick { item, action ->
if (action.isLeftClick) {
player.inventory.addItem(item.createItemStack())
GuiResult.Success(Unit)
} else {
GuiResult.Silent
}
}
}Content copied to clipboard