Item Definition
class ItemDefinition
アイテム定義用 DSL クラス
item('A') {
material = Material.DIAMOND_SWORD
displayName = "戦闘設定"
lore = listOf("クリックして開く")
onClick { action ->
action.player.sendMessage("クリック!")
GuiResult.Success(Unit)
}
}
// カスタムアイテム(プレイヤーの頭など)を使う場合
item('B') {
customItem = player.getCachedPlayerHead {
displayName = "プレイヤー情報"
}
onClick { action ->
GuiResult.Success(Unit)
}
}Content copied to clipboard