Record Class CornucopiaPreparation
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.cornucopia.CornucopiaPreparation
public record CornucopiaPreparation(@NotNull CornucopiaPreparationState state, boolean playersTeleported, boolean cagesCreated, boolean countdownActive, int countdownRemainingSeconds, @NotNull CornucopiaLootPopulationState lootPopulationState, @NotNull Optional<UUID> lootGenerationId, @NotNull Map<UUID,org.bukkit.Location> podiumAssignments)
extends Record
Immutable snapshot of one runtime Cornucopia's preparation and release state.
-
Constructor Summary
ConstructorsConstructorDescriptionCornucopiaPreparation(@NotNull CornucopiaPreparationState state, boolean playersTeleported, boolean cagesCreated, boolean countdownActive, int countdownRemainingSeconds, @NotNull CornucopiaLootPopulationState lootPopulationState, @NotNull Optional<UUID> lootGenerationId, @NotNull Map<UUID, org.bukkit.Location> podiumAssignments) Creates an instance of aCornucopiaPreparationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecagesCreatedrecord component.booleanReturns the value of thecountdownActiverecord component.intReturns the value of thecountdownRemainingSecondsrecord 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 thelootGenerationIdrecord component.@NotNull CornucopiaLootPopulationStateReturns the value of thelootPopulationStaterecord component.booleanReturns the value of theplayersTeleportedrecord component.Returns the value of thepodiumAssignmentsrecord component.@NotNull CornucopiaPreparationStatestate()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CornucopiaPreparation
public CornucopiaPreparation(@NotNull @NotNull CornucopiaPreparationState state, boolean playersTeleported, boolean cagesCreated, boolean countdownActive, int countdownRemainingSeconds, @NotNull @NotNull CornucopiaLootPopulationState lootPopulationState, @NotNull @NotNull Optional<UUID> lootGenerationId, @NotNull @NotNull Map<UUID, org.bukkit.Location> podiumAssignments) Creates an instance of aCornucopiaPreparationrecord class.- Parameters:
state- the value for thestaterecord componentplayersTeleported- the value for theplayersTeleportedrecord componentcagesCreated- the value for thecagesCreatedrecord componentcountdownActive- the value for thecountdownActiverecord componentcountdownRemainingSeconds- the value for thecountdownRemainingSecondsrecord componentlootPopulationState- the value for thelootPopulationStaterecord componentlootGenerationId- the value for thelootGenerationIdrecord componentpodiumAssignments- the value for thepodiumAssignmentsrecord component
-
-
Method Details
-
podiumAssignments
Returns the value of thepodiumAssignmentsrecord component.- Returns:
- the value of the
podiumAssignmentsrecord component
-
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 '=='. -
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
playersTeleported
public boolean playersTeleported()Returns the value of theplayersTeleportedrecord component.- Returns:
- the value of the
playersTeleportedrecord component
-
cagesCreated
public boolean cagesCreated()Returns the value of thecagesCreatedrecord component.- Returns:
- the value of the
cagesCreatedrecord component
-
countdownActive
public boolean countdownActive()Returns the value of thecountdownActiverecord component.- Returns:
- the value of the
countdownActiverecord component
-
countdownRemainingSeconds
public int countdownRemainingSeconds()Returns the value of thecountdownRemainingSecondsrecord component.- Returns:
- the value of the
countdownRemainingSecondsrecord component
-
lootPopulationState
Returns the value of thelootPopulationStaterecord component.- Returns:
- the value of the
lootPopulationStaterecord component
-
lootGenerationId
Returns the value of thelootGenerationIdrecord component.- Returns:
- the value of the
lootGenerationIdrecord component
-