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 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 a CornucopiaPreparation record class.
      Parameters:
      state - the value for the state record component
      playersTeleported - the value for the playersTeleported record component
      cagesCreated - the value for the cagesCreated record component
      countdownActive - the value for the countdownActive record component
      countdownRemainingSeconds - the value for the countdownRemainingSeconds record component
      lootPopulationState - the value for the lootPopulationState record component
      lootGenerationId - the value for the lootGenerationId record component
      podiumAssignments - the value for the podiumAssignments record component
  • Method Details

    • podiumAssignments

      public Map<UUID,org.bukkit.Location> podiumAssignments()
      Returns the value of the podiumAssignments record component.
      Returns:
      the value of the podiumAssignments record component
    • 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.
    • state

      @NotNull public @NotNull CornucopiaPreparationState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • playersTeleported

      public boolean playersTeleported()
      Returns the value of the playersTeleported record component.
      Returns:
      the value of the playersTeleported record component
    • cagesCreated

      public boolean cagesCreated()
      Returns the value of the cagesCreated record component.
      Returns:
      the value of the cagesCreated record component
    • countdownActive

      public boolean countdownActive()
      Returns the value of the countdownActive record component.
      Returns:
      the value of the countdownActive record component
    • countdownRemainingSeconds

      public int countdownRemainingSeconds()
      Returns the value of the countdownRemainingSeconds record component.
      Returns:
      the value of the countdownRemainingSeconds record component
    • lootPopulationState

      @NotNull public @NotNull CornucopiaLootPopulationState lootPopulationState()
      Returns the value of the lootPopulationState record component.
      Returns:
      the value of the lootPopulationState record component
    • lootGenerationId

      @NotNull public @NotNull Optional<UUID> lootGenerationId()
      Returns the value of the lootGenerationId record component.
      Returns:
      the value of the lootGenerationId record component