Class RedisChatAPI

java.lang.Object
dev.unnm3d.redischat.api.RedisChatAPI
Direct Known Subclasses:
ChannelManager

public abstract class RedisChatAPI extends Object
  • Field Details

  • Constructor Details

    • RedisChatAPI

      public RedisChatAPI()
  • Method Details

    • getAPI

      @Nullable public static @Nullable RedisChatAPI getAPI()
      Get API instance
      Returns:
      the API instance
    • getComponentProvider

      public abstract ComponentProvider getComponentProvider()
      Get the component provider
      Returns:
      The component provider
    • getMailManager

      public abstract Optional<MailGUIManager> getMailManager()
      Get the mail manager
      Returns:
      Optional, the mail feature may be disabled
    • getFilterManager

      public abstract FilterManager getFilterManager()
      Get the filter manager
      Returns:
      The filter manager
    • getMuteManager

      public abstract MuteManager getMuteManager()
      Get the Mute Manager
      Returns:
      The mute manager
    • getDataManager

      public abstract DataManager getDataManager()
      Get the Data Manager
      Returns:
      The data manager
    • registerChannel

      public abstract void registerChannel(Channel channel)
      Register a channel
      Parameters:
      channel - The channel to register
    • unregisterChannel

      public abstract void unregisterChannel(String channelName)
      Unregister a channel
      Parameters:
      channelName - The name of the channel to unregister
    • openChannelsGUI

      public abstract void openChannelsGUI(org.bukkit.entity.Player player)
      Open the channels GUI to a player
      Parameters:
      player - The player to open the GUI to
    • broadcastMessage

      public abstract void broadcastMessage(Channel channel, String message)
      Broadcast a message to a channel
      Parameters:
      channel - The channel to broadcast to
      message - The message to broadcast, formatted strings will be parsed accordingly
    • outgoingMessage

      public abstract void outgoingMessage(org.bukkit.command.CommandSender player, @NotNull @NotNull String message)
      Sends a message into the RedisChat system (cross-server)
      Parameters:
      player - The player who sent the message
      message - The message content
    • sendGenericChat

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

      public abstract void pauseChat(@NotNull @NotNull org.bukkit.entity.Player player)
      Pauses the chat for a player and caches all messages sent to them
      Parameters:
      player - The player to pause the chat for
    • isPaused

      public abstract boolean isPaused(@NotNull @NotNull org.bukkit.entity.Player player)
    • unpauseChat

      public abstract void unpauseChat(@NotNull @NotNull org.bukkit.entity.Player player)
      Unpauses the chat for a player and sends all cached messages to them
      Parameters:
      player - The player to unpause the chat for
    • getChannel

      public abstract Optional<Channel> getChannel(@Nullable @Nullable String channelName)
      Get a channel by name null if not found
      Parameters:
      channelName - The name of the channel
      Returns:
      The channel
    • getPublicChannel

      public abstract Channel getPublicChannel(org.bukkit.command.CommandSender player)
      Get the public channel The format of the channel is defined by the player permissions
      Parameters:
      player - The player
      Returns:
      The public channel
    • getStaffChatChannel

      public abstract Channel getStaffChatChannel()
      Get the staff chat channel
      Returns:
      The staff chat channel
    • setActiveChannel

      public abstract void setActiveChannel(String playerName, String channelName)
      Set the active channel for a player
      Parameters:
      playerName - The player name
      channelName - The channel name
    • getActiveChannel

      public abstract CompletionStage<String> getActiveChannel(String playerName)
      Get the active channel for a player
      Parameters:
      playerName - The player name
      Returns:
      The currently enabled channel
    • addVanishIntegration

      public abstract void addVanishIntegration(VanishIntegration vanishIntegration)
      Add vanish "canSee" integration
      Parameters:
      vanishIntegration - The vanish integration
    • removeVanishIntegration

      public abstract void removeVanishIntegration(VanishIntegration vanishIntegration)
      Remove vanish "canSee" integration
      Parameters:
      vanishIntegration - The vanish integration