Package me.kzlyth.api.template.ban
package me.kzlyth.api.template.ban
API package for accessing ban templates (custom bans) in Zenith-Mod.
This package contains the BanTemplateAPI class and
related models (BanTemplate, DurationLevel,
EscalationConfig, TemplateResult),
which provide methods to retrieve ban template information, check offense levels,
calculate template results with escalation, and query template availability.
Important:
- Templates can only be created and modified through configuration files (modules/ban.yml).
- This API is read-only and does not provide methods to create, modify, or delete templates.
- To add new templates or modify existing ones, edit the configuration file and reload the plugin.
Database Compatibility: All methods in this API are fully compatible with H2, SQLite, MySQL, and MariaDB databases. The API automatically adapts to the configured database type from the configuration file.
Example usage:
ZenithAPI api = ZenithAPI.getInstance();
if (api != null) {
BanTemplateAPI templateAPI = api.getBanTemplateAPI();
templateAPI.getTemplate("cheating").thenAccept(template -> {
getLogger().info("Template: " + template.getName());
});
}
- Seit:
- 1.2.3
- Autor:
- Zenith-Studios
-
KlassenKlasseBeschreibungRepresents a ban template (custom ban configuration) in Zenith-Mod.API for accessing ban templates (custom bans) in Zenith-Mod.Represents a duration level within a ban template.Represents the escalation configuration for a ban template.Represents the result of calculating a ban template for a player.