Class EscalationTrack

java.lang.Object
space.arim.libertybans.api.punish.EscalationTrack

public final class EscalationTrack extends Object
Identifies the associated escalation track for a punishment.

For example, a certain rulebreaking infraction such as spamming the chat may be associated to progressively stricter warnings and/or mutes. The escalation track here might be identified as "chat_spamming".

Note that the use of colons in namespaces and values is not permitted, as the colon is a special character reserved for the implementation. Moreover, it is highly recommended to use namespaces and values without any whitespace, for convenience in executing user commands.
  • Field Details

    • DEFAULT_NAMESPACE

      public static final String DEFAULT_NAMESPACE
      The default namespace for escalation tracks. This is typically used by the main implementation of LibertyBans
      See Also:
  • Method Details

    • create

      public static EscalationTrack create(String namespace, String value)
      Creates a track with a given namespace and value
      Parameters:
      namespace - the namespace
      value - the value
      Returns:
      the escalation track
    • createDefault

      public static EscalationTrack createDefault(String value)
      Creates a track in the default namespace
      Parameters:
      value - the value
      Returns:
      the escalation track
    • getNamespace

      public String getNamespace()
      Gets the namespace
      Returns:
      the namespace
    • getValue

      public String getValue()
      Gets the value
      Returns:
      the value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object