Enum Class RemovalReason

java.lang.Object
java.lang.Enum<RemovalReason>
io.papermc.paper.entity.RemovalReason
All Implemented Interfaces:
Serializable, Comparable<RemovalReason>, Constable

public enum RemovalReason extends Enum<RemovalReason>
Represents the reason an entity was removed.
Since:
26.2
See Also:
  • Enum Constant Details

    • KILLED

      public static final RemovalReason KILLED
      Since:
      26.2
    • DISCARDED

      public static final RemovalReason DISCARDED
      Since:
      26.2
    • UNLOADED_TO_CHUNK

      public static final RemovalReason UNLOADED_TO_CHUNK
      Since:
      26.2
    • UNLOADED_WITH_PLAYER

      public static final RemovalReason UNLOADED_WITH_PLAYER
      Since:
      26.2
    • CHANGED_DIMENSION

      public static final RemovalReason CHANGED_DIMENSION
      Since:
      26.2
  • Method Details

    • values

      public static RemovalReason[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RemovalReason valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • shouldDestroy

      public boolean shouldDestroy()
      Returns whether the entity should be destroyed after being removed.
      Returns:
      whether the entity should be destroyed after being removed
      Since:
      26.2
    • shouldSave

      public boolean shouldSave()
      Returns whether the entity should be saved after being removed.
      Returns:
      whether the entity should be saved after being removed
      Since:
      26.2