Klasse ActiveMuteInfo

java.lang.Object
me.kzlyth.api.mute.ActiveMuteInfo

public class ActiveMuteInfo extends Object
Represents complete information about an active mute for a player.

This model contains all relevant information about an active mute including case ID, reason, duration, expiration time, staff member, and whether it's permanent.

Example:


 MuteAPI muteAPI = api.getMuteAPI();
 ActiveMuteInfo muteInfo = muteAPI.getActiveMuteInfo(uuid).join();
 if (muteInfo != null) {
     getLogger().info("Player is muted: " + muteInfo.getReason());
     getLogger().info("Case ID: " + muteInfo.getCaseId());
     if (muteInfo.isPermanent()) {
         getLogger().info("Mute is permanent");
     } else {
         getLogger().info("Mute expires at: " + new Date(muteInfo.getExpiresAt()));
     }
 }
 
Seit:
1.2.3
Autor:
Zenith-Studios
  • Konstruktordetails

    • ActiveMuteInfo

      public ActiveMuteInfo(int caseId, @NotNull @NotNull String reason, long duration, long timestamp, @NotNull @NotNull String staffName, @NotNull UUID staffUuid, boolean ipMute, @Nullable @Nullable String additionalData)
      Constructs a new ActiveMuteInfo object.
      Parameter:
      caseId - The case ID
      reason - The reason for the mute
      duration - The duration in milliseconds, or -1 for permanent
      timestamp - The timestamp when the mute was issued
      staffName - The name of the staff member
      staffUuid - The UUID of the staff member
      ipMute - Whether this is an IP mute
      additionalData - Additional data (JSON string), or null
  • Methodendetails

    • getCaseId

      public int getCaseId()
      Gets the case ID of the active mute.
      Gibt zurück:
      The case ID
    • getReason

      @NotNull public @NotNull String getReason()
      Gets the reason for the mute.
      Gibt zurück:
      The reason
    • getDuration

      public long getDuration()
      Gets the duration of the mute in milliseconds.
      Gibt zurück:
      The duration in milliseconds, or -1 for permanent
    • getTimestamp

      public long getTimestamp()
      Gets the timestamp when the mute was issued.
      Gibt zurück:
      Timestamp in milliseconds since epoch
    • getExpiresAt

      public long getExpiresAt()
      Gets the timestamp when the mute expires.
      Gibt zurück:
      Timestamp in milliseconds since epoch, or -1 for permanent mutes
    • isPermanent

      public boolean isPermanent()
      Checks if the mute is permanent.
      Gibt zurück:
      true if the mute is permanent, false otherwise
    • getStaffName

      @NotNull public @NotNull String getStaffName()
      Gets the name of the staff member who issued the mute.
      Gibt zurück:
      The staff member's name
    • getStaffUuid

      @NotNull public UUID getStaffUuid()
      Gets the UUID of the staff member who issued the mute.
      Gibt zurück:
      The staff member's UUID
    • isIpMute

      public boolean isIpMute()
      Checks if this is an IP mute.
      Gibt zurück:
      true if this is an IP mute, false otherwise
    • getAdditionalData

      @Nullable public @Nullable String getAdditionalData()
      Gets additional data associated with the mute.
      Gibt zurück:
      Additional data as JSON string, or null if none
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object