Class MuteManager

java.lang.Object
dev.unnm3d.redischat.moderation.MuteManager

public class MuteManager extends Object
  • Constructor Details

    • MuteManager

      public MuteManager(RedisChat plugin)
  • 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 mute
      channel - Channel to mute
      muted - 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 mute
      channel - Channel to mute
      muted - 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 ignoring
      ignoredPlayer - Player to ignore
      Returns:
      true if the player is ignored
    • localPlayerIgnore

      public void localPlayerIgnore(@NotNull @NotNull String ignorer, @NotNull @NotNull String ignoredPlayer, boolean ignore)
    • isMutedOnChannel

      public boolean isMutedOnChannel(String playerName, String channel)
      Check if a player is muted in a channel
      Parameters:
      playerName - Player to check
      channel - Channel to check
      Returns:
      true if the player is muted in the channel
    • isPlayerIgnored

      public boolean isPlayerIgnored(String ignorer, String ignored)
      Check if a player is muted for another player
      Parameters:
      ignorer - Who is ignoring
      ignored - Who is being ignored
      Returns:
      true if the "ignorer" is ignoring the "ignored"
    • isWhitelistEnabledPlayer

      public boolean isWhitelistEnabledPlayer(String playerName)
    • getIgnoreList

      public Set<String> getIgnoreList(String playerName)
    • serializedUpdate

      public void serializedUpdate(String serializedUpdate)
    • setWhitelistEnabledPlayer

      public void setWhitelistEnabledPlayer(String playerName, boolean enabled)
    • whitelistEnabledUpdate

      public void whitelistEnabledUpdate(String playerName, boolean enabled)