Record Class CorpseSettingsSnapshot

java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.corpse.CorpseSettingsSnapshot

public record CorpseSettingsSnapshot(boolean enabled, @NotNull String displayNameFormat, int despawnSeconds, boolean warningEnabled, int warningThresholdSeconds, @NotNull CorpseDropPolicy dropPolicy, boolean spawnOnQuit, boolean spawnOnKick, boolean spawnOnCommand) extends Record
Read-only active corpse settings, including any API drop-policy override.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CorpseSettingsSnapshot(boolean enabled, @NotNull String displayNameFormat, int despawnSeconds, boolean warningEnabled, int warningThresholdSeconds, @NotNull CorpseDropPolicy dropPolicy, boolean spawnOnQuit, boolean spawnOnKick, boolean spawnOnCommand)
    Creates an instance of a CorpseSettingsSnapshot record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the despawnSeconds record component.
    @NotNull String
    Returns the value of the displayNameFormat record component.
    Returns the value of the dropPolicy record component.
    boolean
    Returns the value of the enabled record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the spawnOnCommand record component.
    boolean
    Returns the value of the spawnOnKick record component.
    boolean
    Returns the value of the spawnOnQuit record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the warningEnabled record component.
    int
    Returns the value of the warningThresholdSeconds record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CorpseSettingsSnapshot

      public CorpseSettingsSnapshot(boolean enabled, @NotNull @NotNull String displayNameFormat, int despawnSeconds, boolean warningEnabled, int warningThresholdSeconds, @NotNull @NotNull CorpseDropPolicy dropPolicy, boolean spawnOnQuit, boolean spawnOnKick, boolean spawnOnCommand)
      Creates an instance of a CorpseSettingsSnapshot record class.
      Parameters:
      enabled - the value for the enabled record component
      displayNameFormat - the value for the displayNameFormat record component
      despawnSeconds - the value for the despawnSeconds record component
      warningEnabled - the value for the warningEnabled record component
      warningThresholdSeconds - the value for the warningThresholdSeconds record component
      dropPolicy - the value for the dropPolicy record component
      spawnOnQuit - the value for the spawnOnQuit record component
      spawnOnKick - the value for the spawnOnKick record component
      spawnOnCommand - the value for the spawnOnCommand record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • enabled

      public boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • displayNameFormat

      @NotNull public @NotNull String displayNameFormat()
      Returns the value of the displayNameFormat record component.
      Returns:
      the value of the displayNameFormat record component
    • despawnSeconds

      public int despawnSeconds()
      Returns the value of the despawnSeconds record component.
      Returns:
      the value of the despawnSeconds record component
    • warningEnabled

      public boolean warningEnabled()
      Returns the value of the warningEnabled record component.
      Returns:
      the value of the warningEnabled record component
    • warningThresholdSeconds

      public int warningThresholdSeconds()
      Returns the value of the warningThresholdSeconds record component.
      Returns:
      the value of the warningThresholdSeconds record component
    • dropPolicy

      @NotNull public @NotNull CorpseDropPolicy dropPolicy()
      Returns the value of the dropPolicy record component.
      Returns:
      the value of the dropPolicy record component
    • spawnOnQuit

      public boolean spawnOnQuit()
      Returns the value of the spawnOnQuit record component.
      Returns:
      the value of the spawnOnQuit record component
    • spawnOnKick

      public boolean spawnOnKick()
      Returns the value of the spawnOnKick record component.
      Returns:
      the value of the spawnOnKick record component
    • spawnOnCommand

      public boolean spawnOnCommand()
      Returns the value of the spawnOnCommand record component.
      Returns:
      the value of the spawnOnCommand record component