Class ChannelManager

java.lang.Object
dev.unnm3d.redischat.api.RedisChatAPI
dev.unnm3d.redischat.channels.ChannelManager

public class ChannelManager extends RedisChatAPI
  • Constructor Details

    • ChannelManager

      public ChannelManager(RedisChat plugin)
  • Method Details

    • updateChannels

      public void updateChannels()
    • getComponentProvider

      public ComponentProvider getComponentProvider()
      Description copied from class: RedisChatAPI
      Get the component provider
      Specified by:
      getComponentProvider in class RedisChatAPI
      Returns:
      The component provider
    • getMailManager

      public Optional<MailGUIManager> getMailManager()
      Description copied from class: RedisChatAPI
      Get the mail manager
      Specified by:
      getMailManager in class RedisChatAPI
      Returns:
      Optional, the mail feature may be disabled
    • getDataManager

      public DataManager getDataManager()
      Description copied from class: RedisChatAPI
      Get the Data Manager
      Specified by:
      getDataManager in class RedisChatAPI
      Returns:
      The data manager
    • registerChannel

      public void registerChannel(Channel channel)
      Description copied from class: RedisChatAPI
      Register a channel
      Specified by:
      registerChannel in class RedisChatAPI
      Parameters:
      channel - The channel to register
    • updateChannel

      public void updateChannel(String channelName, @Nullable @Nullable Channel channel)
    • unregisterChannel

      public void unregisterChannel(String channelName)
      Description copied from class: RedisChatAPI
      Unregister a channel
      Specified by:
      unregisterChannel in class RedisChatAPI
      Parameters:
      channelName - The name of the channel to unregister
    • openChannelsGUI

      public void openChannelsGUI(org.bukkit.entity.Player player)
      Description copied from class: RedisChatAPI
      Open the channels GUI to a player
      Specified by:
      openChannelsGUI in class RedisChatAPI
      Parameters:
      player - The player to open the GUI to
    • broadcastMessage

      public void broadcastMessage(Channel channel, String message)
      Description copied from class: RedisChatAPI
      Broadcast a message to a channel
      Specified by:
      broadcastMessage in class RedisChatAPI
      Parameters:
      channel - The channel to broadcast to
      message - The message to broadcast, formatted strings will be parsed accordingly
    • outgoingMessage

      public void outgoingMessage(org.bukkit.command.CommandSender player, ChannelAudience receiver, @NotNull @NotNull String message)
      Send a message to a specific ChannelAudience
      Parameters:
      player - The player that is sending the message
      receiver - The receiver audience of the message
      message - The message to be sent
    • outgoingMessage

      public void outgoingMessage(org.bukkit.command.CommandSender player, @NotNull @NotNull String finalMessage)
      Player chat event, called by the chat listener
      Specified by:
      outgoingMessage in class RedisChatAPI
      Parameters:
      player - Player
      finalMessage - The message to be sent
    • outgoingPrivateMessage

      public void outgoingPrivateMessage(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String receiverName, @NotNull @NotNull String message)
      Send a private message to a player
      Parameters:
      sender - The sender of the message
      receiverName - The name of the receiver
      message - The message to be sent
    • sendGenericChat

      public void sendGenericChat(@NotNull @NotNull ChatMessage chatMessage)
      Description copied from class: RedisChatAPI
      Send a generic (non-private) ChatMessageInfo to all local players Checks multicast permissions and mentions (It calls sendComponentOrCache at the end)
      Specified by:
      sendGenericChat in class RedisChatAPI
      Parameters:
      chatMessage - The message to send
    • pauseChat

      public void pauseChat(@NotNull @NotNull org.bukkit.entity.Player player)
      Description copied from class: RedisChatAPI
      Pauses the chat for a player and caches all messages sent to them
      Specified by:
      pauseChat in class RedisChatAPI
      Parameters:
      player - The player to pause the chat for
    • isPaused

      public boolean isPaused(@NotNull @NotNull org.bukkit.entity.Player player)
      Specified by:
      isPaused in class RedisChatAPI
    • unpauseChat

      public void unpauseChat(@NotNull @NotNull org.bukkit.entity.Player player)
      Description copied from class: RedisChatAPI
      Unpauses the chat for a player and sends all cached messages to them
      Specified by:
      unpauseChat in class RedisChatAPI
      Parameters:
      player - The player to unpause the chat for
    • getChannel

      public Optional<Channel> getChannel(@Nullable @Nullable String channelName)
      Description copied from class: RedisChatAPI
      Get a channel by name null if not found
      Specified by:
      getChannel in class RedisChatAPI
      Parameters:
      channelName - The name of the channel
      Returns:
      The channel
    • getPublicChannel

      public Channel getPublicChannel(@Nullable @Nullable org.bukkit.command.CommandSender player)
      Description copied from class: RedisChatAPI
      Get the public channel The format of the channel is defined by the player permissions
      Specified by:
      getPublicChannel in class RedisChatAPI
      Parameters:
      player - The player
      Returns:
      The public channel
    • getStaffChatChannel

      public Channel getStaffChatChannel()
      Description copied from class: RedisChatAPI
      Get the staff chat channel
      Specified by:
      getStaffChatChannel in class RedisChatAPI
      Returns:
      The staff chat channel
    • setActiveChannel

      public void setActiveChannel(String playerName, String channelName)
      Description copied from class: RedisChatAPI
      Set the active channel for a player
      Specified by:
      setActiveChannel in class RedisChatAPI
      Parameters:
      playerName - The player name
      channelName - The channel name
    • getActiveChannel

      public CompletionStage<String> getActiveChannel(String playerName)
      Description copied from class: RedisChatAPI
      Get the active channel for a player
      Specified by:
      getActiveChannel in class RedisChatAPI
      Parameters:
      playerName - The player name
      Returns:
      The currently enabled channel
    • addVanishIntegration

      public void addVanishIntegration(VanishIntegration vanishIntegration)
      Description copied from class: RedisChatAPI
      Add vanish "canSee" integration
      Specified by:
      addVanishIntegration in class RedisChatAPI
      Parameters:
      vanishIntegration - The vanish integration
    • removeVanishIntegration

      public void removeVanishIntegration(VanishIntegration vanishIntegration)
      Description copied from class: RedisChatAPI
      Remove vanish "canSee" integration
      Specified by:
      removeVanishIntegration in class RedisChatAPI
      Parameters:
      vanishIntegration - The vanish integration
    • getAllChannels

      public List<Channel> getAllChannels()