Klasse PlayerMuteEvent

java.lang.Object
me.kzlyth.api.events.ZenithEvent
me.kzlyth.api.events.mute.PlayerMuteEvent

public class PlayerMuteEvent extends ZenithEvent
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
  • 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 player
      playerName - The name of the muted player
      staffUuid - The UUID of the staff member (null for console)
      staffName - The name of the staff member
      reason - The reason for the mute
      caseId - The case ID
      ipMute - Whether this is an IP mute
      durationSeconds - 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