Class ServerPlayerEvents
java.lang.Object
net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
Deprecated.static interface
static interface
static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Event
<ServerPlayerEvents.AfterRespawn> An event that is called after a player has been respawned.static final Event
<ServerPlayerEvents.AllowDeath> Deprecated.Use the more generalServerLivingEntityEvents.ALLOW_DEATH
event instead and check forinstanceof ServerPlayerEntity
.static final Event
<ServerPlayerEvents.CopyFrom> An event that is called when the data from an old player is copied to a new player.static final Event
<ServerPlayerEvents.Join> An event that is called when a player has joined the game.static final Event
<ServerPlayerEvents.Leave> An event that is called when a player is leaving the game. -
Method Summary
-
Field Details
-
COPY_FROM
An event that is called when the data from an old player is copied to a new player.This event is called after the old player is removed and untracked, but before the new player is added and tracked. Mods may use this event to copy old player data to a new player.
- See Also:
-
AFTER_RESPAWN
An event that is called after a player has been respawned.Mods may use this event for reference clean up on the old player.
-
JOIN
An event that is called when a player has joined the game. This includes loading a singleplayer world.This event is called on the server thread after the player has fully been loaded into the world.
-
LEAVE
An event that is called when a player is leaving the game. This includes closing a singleplayer world.This event is called on the server thread before the player has been saved and removed from the world.
-
ALLOW_DEATH
Deprecated.Use the more generalServerLivingEntityEvents.ALLOW_DEATH
event instead and check forinstanceof ServerPlayerEntity
.An event that is called when a player takes fatal damage.
-
ServerLivingEntityEvents.ALLOW_DEATH
event instead and check forinstanceof ServerPlayerEntity
.