Package dev.unnm3d.redischat.moderation
Class MuteManager
java.lang.Object
dev.unnm3d.redischat.moderation.MuteManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIgnoreList
(String playerName) boolean
isMutedOnChannel
(String playerName, String channel) Check if a player is muted in a channelboolean
isPlayerIgnored
(String ignorer, String ignored) Check if a player is muted for another playerboolean
isWhitelistEnabledPlayer
(String playerName) void
localChannelMute
(@NotNull String playerName, @NotNull String channel, boolean muted) Mute/Unmute a player in a channel But only locally, not in the databasevoid
localPlayerIgnore
(@NotNull String ignorer, @NotNull String ignoredPlayer, boolean ignore) void
reload()
void
serializedUpdate
(String serializedUpdate) void
setWhitelistEnabledPlayer
(String playerName, boolean enabled) boolean
toggleIgnorePlayer
(@NotNull String ignorer, @NotNull String ignoredPlayer) Ignore/Unignore a playervoid
toggleMuteOnChannel
(@NotNull String playerName, @NotNull String channel, boolean muted) Mute/Unmute a player in a channelvoid
whitelistEnabledUpdate
(String playerName, boolean enabled)
-
Constructor Details
-
MuteManager
-
-
Method Details
-
reload
public void reload() -
toggleMuteOnChannel
public void toggleMuteOnChannel(@NotNull @NotNull String playerName, @NotNull @NotNull String channel, boolean muted) Mute/Unmute a player in a channel- Parameters:
playerName
- Player to mutechannel
- Channel to mutemuted
- true to mute, false to unmute
-
localChannelMute
public void localChannelMute(@NotNull @NotNull String playerName, @NotNull @NotNull String channel, boolean muted) Mute/Unmute a player in a channel But only locally, not in the database- Parameters:
playerName
- Player to mutechannel
- Channel to mutemuted
- true to mute, false to unmute
-
toggleIgnorePlayer
public boolean toggleIgnorePlayer(@NotNull @NotNull String ignorer, @NotNull @NotNull String ignoredPlayer) Ignore/Unignore a player- Parameters:
ignorer
- Player that is ignoringignoredPlayer
- Player to ignore- Returns:
- true if the player is ignored
-
localPlayerIgnore
-
isMutedOnChannel
Check if a player is muted in a channel- Parameters:
playerName
- Player to checkchannel
- Channel to check- Returns:
- true if the player is muted in the channel
-
isPlayerIgnored
Check if a player is muted for another player- Parameters:
ignorer
- Who is ignoringignored
- Who is being ignored- Returns:
- true if the "ignorer" is ignoring the "ignored"
-
isWhitelistEnabledPlayer
-
getIgnoreList
-
serializedUpdate
-
setWhitelistEnabledPlayer
-
whitelistEnabledUpdate
-