GuiBuilder

GUI 構築用 DSL ビルダー

player.openGui {
title = "設定メニュー"
rows = 3

structure {
+"# # # # # # # # #"
+"# A . B . C . D #"
+"# # # # # # # # #"
}

decoration('#', Material.BLACK_STAINED_GLASS_PANE)

item('A') {
material = Material.DIAMOND_SWORD
displayName = "戦闘設定"
onClick { action ->
GuiResult.Success(Unit)
}
}
}

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var rows: Int
Link copied to clipboard

Functions

Link copied to clipboard
fun decoration(char: Char, material: Material, displayName: String? = null)

装飾アイテムを配置する

Link copied to clipboard
fun item(char: Char, block: ItemDefinition.() -> Unit)

クリック可能なアイテムを配置する

Link copied to clipboard
fun onClose(handler: (Player) -> Unit)

GUI クローズ時のハンドラーを設定

Link copied to clipboard
fun structure(block: StructureBuilder.() -> Unit)

GUI のレイアウト構造を定義する