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
ConstructorsConstructorDescriptionCorpseSettingsSnapshot(boolean enabled, @NotNull String displayNameFormat, int despawnSeconds, boolean warningEnabled, int warningThresholdSeconds, @NotNull CorpseDropPolicy dropPolicy, boolean spawnOnQuit, boolean spawnOnKick, boolean spawnOnCommand) Creates an instance of aCorpseSettingsSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedespawnSecondsrecord component.@NotNull StringReturns the value of thedisplayNameFormatrecord component.@NotNull CorpseDropPolicyReturns the value of thedropPolicyrecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thespawnOnCommandrecord component.booleanReturns the value of thespawnOnKickrecord component.booleanReturns the value of thespawnOnQuitrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thewarningEnabledrecord component.intReturns the value of thewarningThresholdSecondsrecord component.
-
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 aCorpseSettingsSnapshotrecord class.- Parameters:
enabled- the value for theenabledrecord componentdisplayNameFormat- the value for thedisplayNameFormatrecord componentdespawnSeconds- the value for thedespawnSecondsrecord componentwarningEnabled- the value for thewarningEnabledrecord componentwarningThresholdSeconds- the value for thewarningThresholdSecondsrecord componentdropPolicy- the value for thedropPolicyrecord componentspawnOnQuit- the value for thespawnOnQuitrecord componentspawnOnKick- the value for thespawnOnKickrecord componentspawnOnCommand- the value for thespawnOnCommandrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
displayNameFormat
Returns the value of thedisplayNameFormatrecord component.- Returns:
- the value of the
displayNameFormatrecord component
-
despawnSeconds
public int despawnSeconds()Returns the value of thedespawnSecondsrecord component.- Returns:
- the value of the
despawnSecondsrecord component
-
warningEnabled
public boolean warningEnabled()Returns the value of thewarningEnabledrecord component.- Returns:
- the value of the
warningEnabledrecord component
-
warningThresholdSeconds
public int warningThresholdSeconds()Returns the value of thewarningThresholdSecondsrecord component.- Returns:
- the value of the
warningThresholdSecondsrecord component
-
dropPolicy
Returns the value of thedropPolicyrecord component.- Returns:
- the value of the
dropPolicyrecord component
-
spawnOnQuit
public boolean spawnOnQuit()Returns the value of thespawnOnQuitrecord component.- Returns:
- the value of the
spawnOnQuitrecord component
-
spawnOnKick
public boolean spawnOnKick()Returns the value of thespawnOnKickrecord component.- Returns:
- the value of the
spawnOnKickrecord component
-
spawnOnCommand
public boolean spawnOnCommand()Returns the value of thespawnOnCommandrecord component.- Returns:
- the value of the
spawnOnCommandrecord component
-