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 void
addVanishIntegration
(VanishIntegration vanishIntegration) Add vanish "canSee" integrationabstract void
broadcastMessage
(Channel channel, String message) Broadcast a message to a channelabstract CompletionStage
<String> getActiveChannel
(String playerName) Get the active channel for a playerstatic @Nullable RedisChatAPI
getAPI()
Get API instancegetChannel
(@Nullable String channelName) Get a channel by name null if not foundabstract ComponentProvider
Get the component providerabstract DataManager
Get the Data Managerabstract FilterManager
Get the filter managerabstract Optional
<MailGUIManager> Get the mail managerabstract MuteManager
Get the Mute Managerabstract Channel
getPublicChannel
(org.bukkit.command.CommandSender player) Get the public channel The format of the channel is defined by the player permissionsabstract Channel
Get the staff chat channelabstract boolean
isPaused
(@NotNull org.bukkit.entity.Player player) abstract void
openChannelsGUI
(org.bukkit.entity.Player player) Open the channels GUI to a playerabstract void
outgoingMessage
(org.bukkit.command.CommandSender player, @NotNull String message) Sends a message into the RedisChat system (cross-server)abstract void
pauseChat
(@NotNull org.bukkit.entity.Player player) Pauses the chat for a player and caches all messages sent to themabstract void
registerChannel
(Channel channel) Register a channelabstract void
removeVanishIntegration
(VanishIntegration vanishIntegration) Remove vanish "canSee" integrationabstract void
sendGenericChat
(@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 void
setActiveChannel
(String playerName, String channelName) Set the active channel for a playerabstract void
unpauseChat
(@NotNull org.bukkit.entity.Player player) Unpauses the chat for a player and sends all cached messages to themabstract void
unregisterChannel
(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
-