Skip to content

Player Events ​

playerJoin ​

FieldTypeDescription
playerstring (UUID)The joined player
joinMessagestringThe join message (writable: mods.joinMessage)

playerQuit ​

FieldTypeDescription
playerstring (UUID)The player who quit
quitMessagestringThe quit message (writable: mods.quitMessage)

playerChat ​

FieldTypeDescription
playerstring (UUID)The player who sent the message
messagestringThe message content (writable: mods.message)
formatstringThe message format (writable: mods.format)

playerMove ​

FieldTypeDescription
playerstring (UUID)The moving player
fromLocationThe start position of the move (read-only)
toLocationThe target position of the move (writable: mods.to is {x,y,z,yaw?,pitch?,world?}; when world is omitted, the current world is used)

playerInteract ​

FieldTypeDescription
playerstring (UUID)The interacting player
actionstringThe interaction type (LEFT_CLICK_AIR, RIGHT_CLICK_BLOCK, etc.)
materialstring | nullThe material key of the item in hand
blockobject | null{ "x": <int>, "y": <int>, "z": <int>, "type": "<key>" }

playerCommand ​

FieldTypeDescription
playerstring (UUID)The player who ran the command
messagestringThe full command string (including /) (writable: mods.message rewrites the command)

playerDeath ​

FieldTypeDescription
playerstring (UUID)The player who died
deathMessageMessage objectThe death message: { "key": "<translation key>", "args": [...], "text": "<plain text>" } — the translatable component (key/args, when the original message is a translatable component) and the text plain-text fallback are passed together. Writable: mods.deathMessage is a Message object or a string
deathTypestringThe damage type registry key, e.g. minecraft:lava (see value ranges in appendix R1)

Plugins can directly forward deathMessage to a message-sending API (broadcast, player.sendMessage, etc.) — the Message object is naturally compatible.

playerRespawn ​

FieldTypeDescription
playerstring (UUID)The respawning player
respawnLocationLocationThe respawn location (writable: mods.respawnLocation is {x,y,z,yaw?,pitch?,world?})

playerTeleport ​

FieldTypeDescription
playerstring (UUID)The teleported player
fromLocationThe teleport start position (read-only)
toLocationThe teleport target position (writable: mods.to, same as playerMove)
causestringThe teleport cause (PLUGIN, COMMAND, SPECTATE, etc.) (read-only)

playerItemConsume ​

FieldTypeDescription
playerstring (UUID)The player who consumed the item
itemTypestringThe material key of the consumed item

playerDropItem ​

FieldTypeDescription
playerstring (UUID)The player who dropped the item
itemTypestringThe item's material key
amountnumberThe quantity

playerPickupItem ​

FieldTypeDescription
playerstring (UUID)The player who picked up the item
itemTypestringThe item's material key
amountnumberThe quantity

playerBucketFill ​

FieldTypeDescription
playerstring (UUID)The operating player
bucketstringThe bucket item's material key

playerBucketEmpty ​

FieldTypeDescription
playerstring (UUID)The operating player
bucketstringThe bucket item's material key

playerExpChange ​

FieldTypeDescription
playerstring (UUID)The player
amountnumberThe experience change amount

playerLevelChange ​

FieldTypeDescription
playerstring (UUID)The player
oldLevelnumberThe old level
newLevelnumberThe new level

playerGameModeChange ​

FieldTypeDescription
playerstring (UUID)The player
newGameModestringThe new game mode (creative, survival, adventure, spectator, lowercase, consistent with player.getGamemode)

playerAdvancementDone ​

FieldTypeDescription
playerstring (UUID)The player
advancementstringThe advancement namespaced key (e.g. minecraft:story/root)
titleMessage object (optional)The advancement title: a translatable component ({key, args, text}, vanilla advancement titles are translatable components) or plain text ({text}); missing when the advancement is hidden
descriptionMessage object (optional)The advancement description (same as above)

playerToggleSneak ​

FieldTypeDescription
playerstring (UUID)The player
sneakingbooleanWhether the player entered the sneaking state

playerToggleFlight ​

FieldTypeDescription
playerstring (UUID)The player
flyingbooleanWhether the player entered the flying state

foodLevelChange ​

FieldTypeDescription
playerstring (UUID)The player
oldFoodLevelnumberThe old food level
newFoodLevelnumberThe new food level (writable: mods.newFoodLevel)