Package me.kzlyth.api.template.ban
Klasse EscalationConfig
java.lang.Object
me.kzlyth.api.template.ban.EscalationConfig
Represents the escalation configuration for a ban template.
Escalation determines how ban durations increase with repeat offenses. Offenses can be tracked by IP address or by player UUID.
Example:
BanTemplateAPI templateAPI = api.getBanTemplateAPI();
BanTemplate template = templateAPI.getTemplate("cheating").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
KonstruktorenKonstruktorBeschreibungEscalationConfig(boolean enabled, boolean trackByIp, int maxLevel) Constructs a new EscalationConfig object. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungintGets the maximum escalation level.booleanChecks if escalation is enabled for this template.booleanChecks if offenses are tracked by IP address.toString()
-
Konstruktordetails
-
EscalationConfig
public EscalationConfig(boolean enabled, boolean trackByIp, int maxLevel) Constructs a new EscalationConfig object.- Parameter:
enabled- Whether escalation is enabledtrackByIp- Whether offenses are tracked by IP addressmaxLevel- The maximum escalation level
-
-
Methodendetails
-
isEnabled
public boolean isEnabled()Checks if escalation is enabled for this template.- Gibt zurück:
trueif escalation is enabled,falseotherwise
-
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. Iffalse, each player has their own independent offense count.- Gibt zurück:
trueif tracked by IP,falseif tracked by UUID
-
getMaxLevel
public int getMaxLevel()Gets the maximum escalation level.- Gibt zurück:
- The maximum escalation level
-
toString
-