Package me.kzlyth.api.mute
package me.kzlyth.api.mute
API package for muting and unmuting players in Zenith-Mod.
This package contains the MuteAPI class, which provides
methods to mute players (regular and IP mutes), mute using templates (custom mutes with
escalation support), and unmute players. All mutes are automatically recorded in the
history database with a case ID.
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.
Features:
- Regular mutes and IP mutes
- Template-based mutes with escalation support
- Online and offline player muting
- Unmute functionality
- Custom duration formats (e.g., "1d", "2h", "30m", "permanent")
Important Notes:
- Players with the
zenith.mute.bypasspermission cannot be muted - All mutes are recorded in the history database (zn_history)
- Each mute receives a unique case ID
- Templates support escalation (duration increases with repeat offenses)
Example usage:
ZenithAPI api = ZenithAPI.getInstance();
if (api != null) {
MuteAPI muteAPI = api.getMuteAPI();
UUID playerUuid = UUID.fromString("123e4567-e89b-12d3-a456-426614174000");
muteAPI.mute(playerUuid, "Spam", "7d").thenAccept(caseId -> {
getLogger().info("Player muted. Case ID: " + caseId);
});
}
- Seit:
- 1.2.3
- Autor:
- Zenith-Studios
-
KlassenKlasseBeschreibungRepresents complete information about an active mute for a player.API for muting and unmuting players in Zenith-Mod.