Package dev.unnm3d.redischat.channels
Class ChannelManager
java.lang.Object
dev.unnm3d.redischat.api.RedisChatAPI
dev.unnm3d.redischat.channels.ChannelManager
-
Field Summary
Fields inherited from class dev.unnm3d.redischat.api.RedisChatAPI
INSTANCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addVanishIntegration
(VanishIntegration vanishIntegration) Add vanish "canSee" integrationvoid
broadcastMessage
(Channel channel, String message) Broadcast a message to a channelgetActiveChannel
(String playerName) Get the active channel for a playergetChannel
(@Nullable String channelName) Get a channel by name null if not foundGet the component providerGet the Data ManagerGet the mail managergetPublicChannel
(@Nullable org.bukkit.command.CommandSender player) Get the public channel The format of the channel is defined by the player permissionsGet the staff chat channelboolean
isPaused
(@NotNull org.bukkit.entity.Player player) void
openChannelsGUI
(org.bukkit.entity.Player player) Open the channels GUI to a playervoid
outgoingMessage
(org.bukkit.command.CommandSender player, ChannelAudience receiver, @NotNull String message) Send a message to a specific ChannelAudiencevoid
outgoingMessage
(org.bukkit.command.CommandSender player, @NotNull String finalMessage) Player chat event, called by the chat listenervoid
outgoingPrivateMessage
(@NotNull org.bukkit.command.CommandSender sender, @NotNull String receiverName, @NotNull String message) Send a private message to a playervoid
pauseChat
(@NotNull org.bukkit.entity.Player player) Pauses the chat for a player and caches all messages sent to themvoid
registerChannel
(Channel channel) Register a channelvoid
removeVanishIntegration
(VanishIntegration vanishIntegration) Remove vanish "canSee" integrationvoid
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)void
setActiveChannel
(String playerName, String channelName) Set the active channel for a playervoid
unpauseChat
(@NotNull org.bukkit.entity.Player player) Unpauses the chat for a player and sends all cached messages to themvoid
unregisterChannel
(String channelName) Unregister a channelvoid
updateChannel
(String channelName, @Nullable Channel channel) void
Methods inherited from class dev.unnm3d.redischat.api.RedisChatAPI
getAPI, getFilterManager, getMuteManager
-
Constructor Details
-
ChannelManager
-
-
Method Details
-
updateChannels
public void updateChannels() -
getComponentProvider
Description copied from class:RedisChatAPI
Get the component provider- Specified by:
getComponentProvider
in classRedisChatAPI
- Returns:
- The component provider
-
getMailManager
Description copied from class:RedisChatAPI
Get the mail manager- Specified by:
getMailManager
in classRedisChatAPI
- Returns:
- Optional, the mail feature may be disabled
-
getDataManager
Description copied from class:RedisChatAPI
Get the Data Manager- Specified by:
getDataManager
in classRedisChatAPI
- Returns:
- The data manager
-
registerChannel
Description copied from class:RedisChatAPI
Register a channel- Specified by:
registerChannel
in classRedisChatAPI
- Parameters:
channel
- The channel to register
-
updateChannel
-
unregisterChannel
Description copied from class:RedisChatAPI
Unregister a channel- Specified by:
unregisterChannel
in classRedisChatAPI
- 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 classRedisChatAPI
- Parameters:
player
- The player to open the GUI to
-
broadcastMessage
Description copied from class:RedisChatAPI
Broadcast a message to a channel- Specified by:
broadcastMessage
in classRedisChatAPI
- Parameters:
channel
- The channel to broadcast tomessage
- 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 messagereceiver
- The receiver audience of the messagemessage
- 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 classRedisChatAPI
- Parameters:
player
- PlayerfinalMessage
- 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 messagereceiverName
- The name of the receivermessage
- The message to be sent
-
sendGenericChat
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 classRedisChatAPI
- 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 classRedisChatAPI
- Parameters:
player
- The player to pause the chat for
-
isPaused
public boolean isPaused(@NotNull @NotNull org.bukkit.entity.Player player) - Specified by:
isPaused
in classRedisChatAPI
-
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 classRedisChatAPI
- Parameters:
player
- The player to unpause the chat for
-
getChannel
Description copied from class:RedisChatAPI
Get a channel by name null if not found- Specified by:
getChannel
in classRedisChatAPI
- Parameters:
channelName
- The name of the channel- Returns:
- The channel
-
getPublicChannel
Description copied from class:RedisChatAPI
Get the public channel The format of the channel is defined by the player permissions- Specified by:
getPublicChannel
in classRedisChatAPI
- Parameters:
player
- The player- Returns:
- The public channel
-
getStaffChatChannel
Description copied from class:RedisChatAPI
Get the staff chat channel- Specified by:
getStaffChatChannel
in classRedisChatAPI
- Returns:
- The staff chat channel
-
setActiveChannel
Description copied from class:RedisChatAPI
Set the active channel for a player- Specified by:
setActiveChannel
in classRedisChatAPI
- Parameters:
playerName
- The player namechannelName
- The channel name
-
getActiveChannel
Description copied from class:RedisChatAPI
Get the active channel for a player- Specified by:
getActiveChannel
in classRedisChatAPI
- Parameters:
playerName
- The player name- Returns:
- The currently enabled channel
-
addVanishIntegration
Description copied from class:RedisChatAPI
Add vanish "canSee" integration- Specified by:
addVanishIntegration
in classRedisChatAPI
- Parameters:
vanishIntegration
- The vanish integration
-
removeVanishIntegration
Description copied from class:RedisChatAPI
Remove vanish "canSee" integration- Specified by:
removeVanishIntegration
in classRedisChatAPI
- Parameters:
vanishIntegration
- The vanish integration
-
getAllChannels
-