Class ServerPlayerEvents

java.lang.Object
net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents

public final class ServerPlayerEvents extends Object
  • Field Details

    • COPY_FROM

      public static final Event<ServerPlayerEvents.CopyFrom> 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

      public static final Event<ServerPlayerEvents.AfterRespawn> 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.

    • ALLOW_DEATH

      @Deprecated public static final Event<ServerPlayerEvents.AllowDeath> ALLOW_DEATH
      Deprecated.
      Use the more general ServerLivingEntityEvents.ALLOW_DEATH event instead and check for instanceof ServerPlayerEntity.
      An event that is called when a player takes fatal damage.