Record Class RevivalOptions
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.revival.RevivalOptions
public record RevivalOptions(@NotNull Optional<Boolean> restoreClassItems, @NotNull Optional<Boolean> restoreLostLoot, @NotNull Optional<org.bukkit.Location> destination)
extends Record
Optional per-operation overrides for a revival. Empty values use Zentrix settings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull RevivalOptionsat(@NotNull org.bukkit.Location value) static @NotNull RevivalOptionsdefaults()Optional<org.bukkit.Location> Returns the value of thedestinationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of therestoreClassItemsrecord component.Returns the value of therestoreLostLootrecord component.final StringtoString()Returns a string representation of this record class.@NotNull RevivalOptionswithRestoreClassItems(boolean value) @NotNull RevivalOptionswithRestoreLostLoot(boolean value)
-
Constructor Details
-
RevivalOptions
public RevivalOptions(@NotNull @NotNull Optional<Boolean> restoreClassItems, @NotNull @NotNull Optional<Boolean> restoreLostLoot, @NotNull @NotNull Optional<org.bukkit.Location> destination) Creates an instance of aRevivalOptionsrecord class.- Parameters:
restoreClassItems- the value for therestoreClassItemsrecord componentrestoreLostLoot- the value for therestoreLostLootrecord componentdestination- the value for thedestinationrecord component
-
-
Method Details
-
destination
Returns the value of thedestinationrecord component.- Returns:
- the value of the
destinationrecord component
-
defaults
-
withRestoreClassItems
-
withRestoreLostLoot
-
at
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
restoreClassItems
Returns the value of therestoreClassItemsrecord component.- Returns:
- the value of the
restoreClassItemsrecord component
-
restoreLostLoot
Returns the value of therestoreLostLootrecord component.- Returns:
- the value of the
restoreLostLootrecord component
-