-
Notifications
You must be signed in to change notification settings - Fork 0
Events
- From a connected client run
Listen <EventName>- Example:
Listen PlayerDeathEvent
- Example:
- From a connected client, that is already listening to an event, run
Ignore <EventName>- Example:
Ignore PlayerDeathEvent
- Example:
Events are formatted like
Event <EventName> <JsonArray of arguments>
- Example:
Event PlayerDeathEvent ["PlayerName","PlayerName died from falling", {"world":"world","x":1000,"y":20,"z":20}]- Text wrapped with
""is used to represent a string
- Example:
"PlayerName"is a string representing the player name- Text not wrapped with anything is used to represent a number
- Example:
1000is a number representing 1000, andHealthRemainingis a number representing the remaining health- Text wrapped with
{}is used to represent a Json object
- Example:
{"world":"world","x":1000,"y":20,"z":20}is a Json object representing the world, x, y, and z coordinates- Text wrapped with
[]is used to represent a Json array
- Example:
["PlayerName","PlayerName died from falling",{"world":"world","x":1000,"y":20,"z":20}]is a Json array representing the player name, the death message, and the world, x, y, and z coordinates
PlayerDeathEvent
This event is triggered when a player dies
Event PlayerDeathEvent ["PlayerName","PlayerName died from falling",{"world":"world","x":1000,"y":20,"z":20}]
Arguments:
-
[0] -
Player who died -
[1] -
Cause of death -
[2] -
Location of death-
world -
World died in -
x -
X position of death -
y -
Y position of death -
z -
Z position of death
-
world -
PlayerJoinEvent
This event is triggered when a player joins
Event PlayerJoinEvent ["PlayerName"]
Arguments:
-
[0] -
Player who joined
PlayerQuitEvent
This event is triggered when a player leaves
Event PlayerQuitEvent ["PlayerName"]
Arguments:
-
[0] -
Player who left
PlayerChatEvent
This event is triggered when a player chats
Event PlayerChatEvent ["PlayerName","Message sent in chat"]
Arguments:
-
[0] -
Player who sent the message -
[1] -
Message sent in chat
PlayerDamageEvent
This event is triggered when a player takes damage
Event PlayerDamageEvent ["PlayerName",damageTaken,remainingHealth,"causeOfDamage"]
Arguments:
-
[0] -
Player who was damaged -
[1] -
Damage taken -
[2] -
Remaining health -
[3] -
Cause of damageList of causes
PlayerHealEvent
This event is triggered when a player regains health
Event PlayerHealEvent ["PlayerName",healthRegained,newHealth]
Arguments:
-
[0] -
Player who regained health -
[1] -
Damage taken -
[2] -
Remaining health -
[3] -
Cause of regenerationList of causes
PlayerAdvancementDoneEvent
This event is triggered when a player completes an advancement
Event PlayerAdvancementDoneEvent ["PlayerName","AdvancementName"]
Arguments:
-
[0] -
Player who completed the advancement -
[1] -
Advancement nameList of advancements
PlayerChangedWorldEvent
This event is triggered when a player changes worlds
Event Name ["PlayerName","NewWorld","OldWorld"]
Arguments:
-
[0] -
Player who changed worlds -
[1] -
New world -
[2] -
Old world
PlayerFoodChangeEvent
This event is triggered when a players food level changes
Event Name ["PlayerName",foodLevel,saturation]
Arguments:
-
[0] -
Player who's food level changed -
[1] -
Food level -
[2] -
Saturation
PlayerDamagePlayerEvent
This event is triggered when a player damages another player
Event Name ["PlayerName","Damager",damage,remainingHealth,damagerHealth]
Arguments:
-
[0] -
Player who took damage -
[1] -
Player who did the damage -
[2] -
Damage taken -
[3] -
Remaining health -
[4] -
Damager health
PlayerStatusChangeEvent
This event is triggered when one of the following changes:
- Player is swimming / no longer swimming
- Player is flying / no longer flying
- Player is freezing / no longer freezing
- Player is burning / no longer burning
- Player is gliding / no longer gliding (elytra)
PlayerStatusChangeEvent ["PlayerName",{status},{oldStatus}]
Arguments:
-
[0] -
Player who changed status -
[1] -
New status -
[2] -
Old status-
status -
{"isSwimming":bool,"isFreezing":bool,"isBurning":bool,"isFlying":bool,"isGliding":bool}
-
status -
PlayerMoveEvent
This event is triggered when a player moves (only when the block changes)
PlayerMoveEvent ["PlayerName",{location},{oldLocation},"BlockStandingIn","BlockStandingOn"]
Arguments:
-
[0] -
Player who moved -
[1] -
New location-
world -
World moved in -
x -
X position of new location -
y -
Y position of new location -
z -
Z position of new location
-
world -
-
[2] -
Old location- See above for location arguments
-
[3] -
Block standing in- Material name, ex:
air,stone,dirt
- Material name, ex:
-
[4] -
Block standing on- See above for block arguments