Package me.kzlyth.api.events.mute
Klasse PlayerMuteEvent
java.lang.Object
me.kzlyth.api.events.ZenithEvent
me.kzlyth.api.events.mute.PlayerMuteEvent
Event fired when a player is muted.
For detailed documentation and examples, see: https://docs.zenith-studios.org/
Example:
ZenithEventBus.getInstance().subscribe(PlayerMuteEvent.class, event -> {
getLogger().info(event.getPlayerName() + " was muted: " + event.getReason());
});
- Seit:
- 1.2.3
- Autor:
- Zenith-Studios
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunglongGets the duration of the mute in seconds.booleanisIpMute()Checks if this is an IP mute.booleanChecks if this is a permanent mute.Von Klasse geerbte Methoden me.kzlyth.api.events.ZenithEvent
getCaseId, getPlayer, getPlayerName, getPlayerUuid, getReason, getStaffName, getStaffPlayer, getStaffUuid, isCancelled, setCancelled
-
Konstruktordetails
-
PlayerMuteEvent
public PlayerMuteEvent(@NotNull @NotNull UUID playerUuid, @NotNull @NotNull String playerName, @Nullable @Nullable UUID staffUuid, @NotNull @NotNull String staffName, @NotNull @NotNull String reason, int caseId, boolean ipMute, long durationSeconds) Constructs a new PlayerMuteEvent.- Parameter:
playerUuid- The UUID of the muted playerplayerName- The name of the muted playerstaffUuid- The UUID of the staff member (null for console)staffName- The name of the staff memberreason- The reason for the mutecaseId- The case IDipMute- Whether this is an IP mutedurationSeconds- The duration in seconds (-1 for permanent)
-
-
Methodendetails
-
isIpMute
public boolean isIpMute()Checks if this is an IP mute.- Gibt zurück:
- True if IP mute, false otherwise
-
getDurationSeconds
public long getDurationSeconds()Gets the duration of the mute in seconds.- Gibt zurück:
- The duration in seconds, or -1 for permanent
-
isPermanent
public boolean isPermanent()Checks if this is a permanent mute.- Gibt zurück:
- True if permanent, false otherwise
-