Search the docs

Find a guide, global, type or member

TypeEmber

EventName

A built-in event for events.on. Each fills the Event fields listed; (c) marks a cancellable one.

  • blockBreak (c): a player breaks a block. player, x/y/z (block), block (the broken block).
  • blockPlace (c): a player places a block. player, x/y/z, block (the placed block), face.
  • blockInteract (c): a player right-clicks a block. player, x/y/z, block, face.
  • playerJoin: a player enters the match (and again for everyone present after a script reload). player.
  • playerLeave: a player leaves the match (/leave or disconnect). player, still usable in the handler.
  • playerMove (c): a player moves into another block (every move for precise handlers). player, x/y/z (destination), fromX/fromY/fromZ; e:setDestination redirects.
  • playerDamage (c): a player is about to be hurt. player, amount, cause, attacker; e:setAmount.
  • playerDeath: a player died. player, drops; e:setDrops.
  • playerRespawn: a player respawns. player, x/y/z; e:setPosition picks the spot.
  • playerAttack: a player hits an entity. player, target, targetPlayer.
  • entityDamage (c): an entity is about to be hurt. entity, amount, cause, attacker; e:setAmount.
  • entityDeath: an entity died. entity, drops, cause, attacker; e:setDrops.
  • entityInteract: a player right-clicks an entity. player, target, targetPlayer, hand.
  • itemUseStart (c): a player starts using an item (eating, drawing a bow). player, item, count.
  • itemUseCancel: a player lets go before finishing. player.
  • itemUseFinish: a player finishes using an item. player, item, count, hand.
  • itemUseOnBlock: a player uses an item on a block. player, item, count, x/y/z, face.
  • itemDrop (c): a player drops an item. player, item, count.
  • jump: a player presses jump. player.
  • swing (c), handSwap (c), use (c): a player presses attack, swap hands, or use. player.
type EventName = "blockBreak" | "blockPlace" | "blockInteract"
	| "playerJoin" | "playerLeave" | "playerMove" | "playerDamage" | "playerDeath" | "playerRespawn" | "playerAttack"
	| "entityDamage" | "entityDeath" | "entityInteract"
	| "itemUseStart" | "itemUseCancel" | "itemUseFinish" | "itemUseOnBlock" | "itemDrop"
	| "jump" | "swing" | "handSwap" | "use"