Class MuteProvider
java.lang.Object
de.murmelmeister.murmelapi.bansystem.mute.MuteProvider
- All Implemented Interfaces:
Mute
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcreateTable(String tableName) getExpiredDate(int userId) Retrieves the expiration date of the mute for the specified user.longgetExpiredTime(int userId) Retrieves the expiration time of the mute for the specified user.getLog()Retrieves the log associated with the mute actions.Provides the reason associated with the mute action.booleanisMuted(int userId) Checks if a user is currently muted.voidmute(int userId, int creatorId, int reasonId, long time) Mutes a user for a specified period of time.voidunmute(int userId) Unmutes a user, removing any mute restrictions previously placed on them.
-
Field Details
-
reason
-
log
-
-
Constructor Details
-
MuteProvider
public MuteProvider()
-
-
Method Details
-
createTable
-
mute
public void mute(int userId, int creatorId, int reasonId, long time) Description copied from interface:MuteMutes a user for a specified period of time. -
unmute
public void unmute(int userId) Description copied from interface:MuteUnmutes a user, removing any mute restrictions previously placed on them. -
getExpiredTime
public long getExpiredTime(int userId) Description copied from interface:MuteRetrieves the expiration time of the mute for the specified user.- Specified by:
getExpiredTimein interfaceMute- Parameters:
userId- The ID of the user whose mute expiration time is to be retrieved.- Returns:
- The expiration time of the mute in milliseconds since epoch, or -1 if the user is not muted.
-
getExpiredDate
Description copied from interface:MuteRetrieves the expiration date of the mute for the specified user.- Specified by:
getExpiredDatein interfaceMute- Parameters:
userId- The ID of the user whose mute expiration date is to be retrieved.- Returns:
- The expiration date of the mute as a string.
-
isMuted
public boolean isMuted(int userId) Description copied from interface:MuteChecks if a user is currently muted. -
getReason
Description copied from interface:MuteProvides the reason associated with the mute action. -
getLog
Description copied from interface:MuteRetrieves the log associated with the mute actions.
-