Package me.kzlyth.api.mute
Klasse ActiveMuteInfo
java.lang.Object
me.kzlyth.api.mute.ActiveMuteInfo
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
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungActiveMuteInfo(int caseId, @NotNull String reason, long duration, long timestamp, @NotNull String staffName, UUID staffUuid, boolean ipMute, @Nullable String additionalData) Constructs a new ActiveMuteInfo object. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibung@Nullable StringGets additional data associated with the mute.intGets the case ID of the active mute.longGets the duration of the mute in milliseconds.longGets the timestamp when the mute expires.@NotNull StringGets the reason for the mute.@NotNull StringGets the name of the staff member who issued the mute.Gets the UUID of the staff member who issued the mute.longGets the timestamp when the mute was issued.booleanisIpMute()Checks if this is an IP mute.booleanChecks if the mute is permanent.toString()
-
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 IDreason- The reason for the muteduration- The duration in milliseconds, or -1 for permanenttimestamp- The timestamp when the mute was issuedstaffName- The name of the staff memberstaffUuid- The UUID of the staff memberipMute- Whether this is an IP muteadditionalData- 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
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:
trueif the mute is permanent,falseotherwise
-
getStaffName
Gets the name of the staff member who issued the mute.- Gibt zurück:
- The staff member's name
-
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:
trueif this is an IP mute,falseotherwise
-
getAdditionalData
Gets additional data associated with the mute.- Gibt zurück:
- Additional data as JSON string, or
nullif none
-
toString
-