Klasse EscalationConfig

java.lang.Object
me.kzlyth.api.template.mute.EscalationConfig

public class EscalationConfig extends Object
Represents the escalation configuration for a mute template.

Escalation determines how mute durations increase with repeat offenses. Offenses can be tracked by IP address or by player UUID.

Example:


 MuteTemplateAPI templateAPI = api.getMuteTemplateAPI();
 MuteTemplate template = templateAPI.getTemplate("spam").join();
 if (template != null && template.getEscalation() != null) {
     EscalationConfig escalation = template.getEscalation();
     getLogger().info("Escalation enabled: " + escalation.isEnabled());
     getLogger().info("Track by IP: " + escalation.isTrackByIp());
     getLogger().info("Max level: " + escalation.getMaxLevel());
 }
 
Seit:
1.2.3
Autor:
Zenith-Studios
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    EscalationConfig(boolean enabled, boolean trackByIp, int maxLevel)
    Constructs a new EscalationConfig object.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    int
    Gets the maximum escalation level.
    boolean
    Checks if escalation is enabled for this template.
    boolean
    Checks if offenses are tracked by IP address.
     

    Von Klasse geerbte Methoden java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Konstruktordetails

    • EscalationConfig

      public EscalationConfig(boolean enabled, boolean trackByIp, int maxLevel)
      Constructs a new EscalationConfig object.
      Parameter:
      enabled - Whether escalation is enabled
      trackByIp - Whether offenses are tracked by IP address
      maxLevel - The maximum escalation level
  • Methodendetails

    • isEnabled

      public boolean isEnabled()
      Checks if escalation is enabled for this template.
      Gibt zurück:
      true if escalation is enabled, false otherwise
    • isTrackByIp

      public boolean isTrackByIp()
      Checks if offenses are tracked by IP address.

      If true, all accounts from the same IP share the same offense count. If false, each player has their own independent offense count.

      Gibt zurück:
      true if tracked by IP, false if tracked by UUID
    • getMaxLevel

      public int getMaxLevel()
      Gets the maximum escalation level.
      Gibt zurück:
      The maximum escalation level
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object