GhostDisplays/main/kotlin/net/hareworks/ghostdisplays/api/click/DisplayClick.kt
2025-12-06 04:40:18 +09:00

36 lines
763 B
Kotlin

package net.hareworks.ghostdisplays.api.click
import net.hareworks.ghostdisplays.api.DisplayController
import org.bukkit.entity.Entity
import org.bukkit.entity.Player
import org.bukkit.event.player.PlayerInteractEntityEvent
import org.bukkit.inventory.EquipmentSlot
enum class ClickPriority {
HIGH,
NORMAL,
LOW
}
enum class ClickSurface {
DISPLAY,
INTERACTION
}
data class DisplayClickContext(
val player: Player,
val hand: EquipmentSlot?,
val clickedEntity: Entity,
val surface: ClickSurface,
val controller: DisplayController<*>,
val event: PlayerInteractEntityEvent
)
fun interface DisplayClickHandler {
fun handle(context: DisplayClickContext)
}
fun interface HandlerRegistration {
fun unregister()
}