Enum Class ScenarioTieRule

java.lang.Object
java.lang.Enum<ScenarioTieRule>
dev.itsharshxd.zentrix.api.scenario.vote.ScenarioTieRule
All Implemented Interfaces:
Serializable, Comparable<ScenarioTieRule>, Constable

public enum ScenarioTieRule extends Enum<ScenarioTieRule>
How a vote resolves when several scenarios finish on the same number of votes and only some of them fit into the winner count.

Every rule is deterministic in the sense that it always produces a full, valid winner set; only RANDOM is deliberately non-repeatable.

Since:
1.6.0
  • Enum Constant Details

    • RANDOM

      public static final ScenarioTieRule RANDOM
      Pick between the tied scenarios at random.
    • PRIORITY

      public static final ScenarioTieRule PRIORITY
      Prefer the tied scenario with the highest scenario priority, then the lowest ID.
    • FIRST_VOTE

      public static final ScenarioTieRule FIRST_VOTE
      Keep the scenario whose first vote was cast earliest.
    • INCLUDE_ALL

      public static final ScenarioTieRule INCLUDE_ALL
      Run every tied scenario, going over the configured winner count.
    • EXCLUDE_ALL

      public static final ScenarioTieRule EXCLUDE_ALL
      Drop every tied scenario and fill the remaining slots from the next-highest tally.
  • Method Details

    • values

      public static ScenarioTieRule[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ScenarioTieRule valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null