Dialog

class Dialog(val player: Player, val title: String? = null, val subtitle: String? = null, val actionbar: String? = null, val closeAction: CloseAction = CloseAction.ANY_CLICK, val onChat: (Player, String) -> Boolean = { _, _ -> true }, val allowedActions: List<AllowedActions> = listOf(AllowedActions.NONE)) : Listener

Represents a Dialog (Title, Subtitle and Actionbar message)

Parameters

player

The player to send the dialog to

title

The title of the dialog. (Optional)

subtitle

The subtitle of the dialog. (Optional)

actionbar

The actionbar message of the dialog. (Optional)

closeAction

The kind of action needed to close the dialog. (Default to ANY_CLICK)

onChat

The action to perform when the player sends a message. If true is returned, the dialog will be closed. (Default to true)

allowedActions

The actions that are allowed while the player is in the dialog. (Default to NONE)

Constructors

Link copied to clipboard
constructor(player: Player, title: String? = null, subtitle: String? = null, actionbar: String? = null, closeAction: CloseAction = CloseAction.ANY_CLICK, onChat: (Player, String) -> Boolean = { _, _ -> true }, allowedActions: List<AllowedActions> = listOf(AllowedActions.NONE))

Properties

Link copied to clipboard
val actionbar: String? = null
Link copied to clipboard
Link copied to clipboard

Should the player be able to close the dialog?

Link copied to clipboard
Link copied to clipboard

Was this dialog closed manually or programmatically?

Link copied to clipboard
Link copied to clipboard
val onChat: (Player, String) -> Boolean
Link copied to clipboard
val player: Player
Link copied to clipboard
val subtitle: String? = null
Link copied to clipboard
val title: String? = null

Functions

Link copied to clipboard
fun close(sendMessage: Boolean = true): Dialog
Link copied to clipboard
fun onBlockBreak(e: BlockPlaceEvent)
Link copied to clipboard
fun onBlockFertilize(e: BlockFertilizeEvent)
Link copied to clipboard
fun onBlockIgnite(e: BlockIgniteEvent)
Link copied to clipboard
fun onBlockPlace(e: BlockPlaceEvent)
Link copied to clipboard
fun onCommand(e: PlayerCommandPreprocessEvent)
Link copied to clipboard
fun onDrop(e: PlayerDropItemEvent)
Link copied to clipboard
fun onEntityDamageByEntity(e: EntityDamageByEntityEvent)
Link copied to clipboard
fun onEntityInteract(e: EntityInteractEvent)
Link copied to clipboard
fun onHangingBreakByEntityEvent(e: HangingBreakByEntityEvent)
Link copied to clipboard
fun onHangingPlace(e: HangingPlaceEvent)
Link copied to clipboard
fun onInteract(e: PlayerInteractEvent)
Link copied to clipboard
fun onInventoryClick(e: InventoryClickEvent)
Link copied to clipboard
fun onInventoryOpen(e: InventoryOpenEvent)
Link copied to clipboard
fun onMessageReceived(e: AsyncPlayerChatEvent)
Link copied to clipboard
fun onMove(e: PlayerInteractEvent)
Link copied to clipboard
fun onPickup(e: EntityPickupItemEvent)
Link copied to clipboard
fun onPlayerBucketEmpty(e: PlayerBucketEmptyEvent)
Link copied to clipboard
fun onPlayerBucketFill(e: PlayerBucketFillEvent)
Link copied to clipboard
fun onPlayerInteractAtEntity(e: PlayerInteractAtEntityEvent)
Link copied to clipboard
fun onPlayerInteractEntity(e: PlayerInteractEntityEvent)
Link copied to clipboard
fun open(): Dialog