Class PlayerEvent.Clone

Enclosing class:
PlayerEvent

public static class PlayerEvent.Clone extends PlayerEvent
Fired when the player is cloned, typically caused by the impl sending a RESPAWN_PLAYER event. Either caused by death, or by traveling from the End to the overworld.

This event is not cancellable, and is fired on the game event bus.

  • Field Details

    • original

      private final Player original
    • wasDeath

      private final boolean wasDeath
  • Constructor Details

    • Clone

      public Clone(Player _new, Player oldPlayer, boolean wasDeath)
  • Method Details

    • getOriginal

      public Player getOriginal()
      The old Player that this new entity is a clone of.
    • isWasDeath

      public boolean isWasDeath()
      True if this event was fired because the player died. False if it was fired because the entity switched dimensions.