Package dev.unnm3d.redischat.api
Class RedisChatAPI
java.lang.Object
dev.unnm3d.redischat.api.RedisChatAPI
- Direct Known Subclasses:
ChannelManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddVanishIntegration(VanishIntegration vanishIntegration) Add vanish "canSee" integrationabstract voidbroadcastMessage(Channel channel, String message) Broadcast a message to a channelabstract CompletionStage<String> getActiveChannel(String playerName) Get the active channel for a playerstatic @Nullable RedisChatAPIgetAPI()Get API instancegetChannel(@Nullable String channelName) Get a channel by name null if not foundabstract ComponentProviderGet the component providerabstract DataManagerGet the Data Managerabstract FilterManagerGet the filter managerabstract Optional<MailGUIManager> Get the mail managerabstract MuteManagerGet the Mute Managerabstract ChannelgetPublicChannel(org.bukkit.command.CommandSender player) Get the public channel The format of the channel is defined by the player permissionsabstract ChannelGet the staff chat channelabstract booleanisPaused(@NotNull org.bukkit.entity.Player player) abstract voidopenChannelsGUI(org.bukkit.entity.Player player) Open the channels GUI to a playerabstract voidoutgoingMessage(org.bukkit.command.CommandSender player, @NotNull String message) Sends a message into the RedisChat system (cross-server)abstract voidpauseChat(@NotNull org.bukkit.entity.Player player) Pauses the chat for a player and caches all messages sent to themabstract voidregisterChannel(Channel channel) Register a channelabstract voidremoveVanishIntegration(VanishIntegration vanishIntegration) Remove vanish "canSee" integrationabstract voidsendGenericChat(@NotNull ChatMessage chatMessage) Send a generic (non-private) ChatMessageInfo to all local players Checks multicast permissions and mentions (It calls sendComponentOrCache at the end)abstract voidsetActiveChannel(String playerName, String channelName) Set the active channel for a playerabstract voidunpauseChat(@NotNull org.bukkit.entity.Player player) Unpauses the chat for a player and sends all cached messages to themabstract voidunregisterChannel(String channelName) Unregister a channel
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
RedisChatAPI
public RedisChatAPI()
-
-
Method Details
-
getAPI
Get API instance- Returns:
- the API instance
-
getComponentProvider
Get the component provider- Returns:
- The component provider
-
getMailManager
Get the mail manager- Returns:
- Optional, the mail feature may be disabled
-
getFilterManager
Get the filter manager- Returns:
- The filter manager
-
getMuteManager
Get the Mute Manager- Returns:
- The mute manager
-
getDataManager
Get the Data Manager- Returns:
- The data manager
-
registerChannel
Register a channel- Parameters:
channel- The channel to register
-
unregisterChannel
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
Broadcast a message to a channel- Parameters:
channel- The channel to broadcast tomessage- 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 messagemessage- The message content
-
sendGenericChat
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
Get a channel by name null if not found- Parameters:
channelName- The name of the channel- Returns:
- The channel
-
getPublicChannel
Get the public channel The format of the channel is defined by the player permissions- Parameters:
player- The player- Returns:
- The public channel
-
getStaffChatChannel
Get the staff chat channel- Returns:
- The staff chat channel
-
setActiveChannel
Set the active channel for a player- Parameters:
playerName- The player namechannelName- The channel name
-
getActiveChannel
Get the active channel for a player- Parameters:
playerName- The player name- Returns:
- The currently enabled channel
-
addVanishIntegration
Add vanish "canSee" integration- Parameters:
vanishIntegration- The vanish integration
-
removeVanishIntegration
Remove vanish "canSee" integration- Parameters:
vanishIntegration- The vanish integration
-