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.
See Also:
  • Enum Constant Details

    • KILLED

      public static final RemovalReason KILLED
    • DISCARDED

      public static final RemovalReason DISCARDED
    • UNLOADED_TO_CHUNK

      public static final RemovalReason UNLOADED_TO_CHUNK
    • UNLOADED_WITH_PLAYER

      public static final RemovalReason UNLOADED_WITH_PLAYER
    • CHANGED_DIMENSION

      public static final RemovalReason CHANGED_DIMENSION
  • 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
    • shouldSave

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