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 TypeMethodDescriptionvoidaddVanishIntegration(VanishIntegration vanishIntegration) Add vanish "canSee" integrationvoidbroadcastMessage(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 channelbooleanisPaused(@NotNull org.bukkit.entity.Player player) voidopenChannelsGUI(org.bukkit.entity.Player player) Open the channels GUI to a playervoidoutgoingMessage(org.bukkit.command.CommandSender player, ChannelAudience receiver, @NotNull String message) Send a message to a specific ChannelAudiencevoidoutgoingMessage(org.bukkit.command.CommandSender player, @NotNull String finalMessage) Player chat event, called by the chat listenervoidoutgoingPrivateMessage(@NotNull org.bukkit.command.CommandSender sender, @NotNull String receiverName, @NotNull String message) Send a private message to a playervoidpauseChat(@NotNull org.bukkit.entity.Player player) Pauses the chat for a player and caches all messages sent to themvoidregisterChannel(Channel channel) Register a channelvoidremoveVanishIntegration(VanishIntegration vanishIntegration) Remove vanish "canSee" integrationvoidsendGenericChat(@NotNull ChatMessage chatMessage) Send a generic (non-private) ChatMessageInfo to all local players Checks multicast permissions and mentions (It calls sendComponentOrCache at the end)voidsetActiveChannel(String playerName, String channelName) Set the active channel for a playervoidunpauseChat(@NotNull org.bukkit.entity.Player player) Unpauses the chat for a player and sends all cached messages to themvoidunregisterChannel(String channelName) Unregister a channelvoidupdateChannel(String channelName, @Nullable Channel channel) voidMethods 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:RedisChatAPIGet the component provider- Specified by:
getComponentProviderin classRedisChatAPI- Returns:
- The component provider
-
getMailManager
Description copied from class:RedisChatAPIGet the mail manager- Specified by:
getMailManagerin classRedisChatAPI- Returns:
- Optional, the mail feature may be disabled
-
getDataManager
Description copied from class:RedisChatAPIGet the Data Manager- Specified by:
getDataManagerin classRedisChatAPI- Returns:
- The data manager
-
registerChannel
Description copied from class:RedisChatAPIRegister a channel- Specified by:
registerChannelin classRedisChatAPI- Parameters:
channel- The channel to register
-
updateChannel
-
unregisterChannel
Description copied from class:RedisChatAPIUnregister a channel- Specified by:
unregisterChannelin classRedisChatAPI- Parameters:
channelName- The name of the channel to unregister
-
openChannelsGUI
public void openChannelsGUI(org.bukkit.entity.Player player) Description copied from class:RedisChatAPIOpen the channels GUI to a player- Specified by:
openChannelsGUIin classRedisChatAPI- Parameters:
player- The player to open the GUI to
-
broadcastMessage
Description copied from class:RedisChatAPIBroadcast a message to a channel- Specified by:
broadcastMessagein 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:
outgoingMessagein 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:RedisChatAPISend a generic (non-private) ChatMessageInfo to all local players Checks multicast permissions and mentions (It calls sendComponentOrCache at the end)- Specified by:
sendGenericChatin classRedisChatAPI- Parameters:
chatMessage- The message to send
-
pauseChat
public void pauseChat(@NotNull @NotNull org.bukkit.entity.Player player) Description copied from class:RedisChatAPIPauses the chat for a player and caches all messages sent to them- Specified by:
pauseChatin classRedisChatAPI- Parameters:
player- The player to pause the chat for
-
isPaused
public boolean isPaused(@NotNull @NotNull org.bukkit.entity.Player player) - Specified by:
isPausedin classRedisChatAPI
-
unpauseChat
public void unpauseChat(@NotNull @NotNull org.bukkit.entity.Player player) Description copied from class:RedisChatAPIUnpauses the chat for a player and sends all cached messages to them- Specified by:
unpauseChatin classRedisChatAPI- Parameters:
player- The player to unpause the chat for
-
getChannel
Description copied from class:RedisChatAPIGet a channel by name null if not found- Specified by:
getChannelin classRedisChatAPI- Parameters:
channelName- The name of the channel- Returns:
- The channel
-
getPublicChannel
Description copied from class:RedisChatAPIGet the public channel The format of the channel is defined by the player permissions- Specified by:
getPublicChannelin classRedisChatAPI- Parameters:
player- The player- Returns:
- The public channel
-
getStaffChatChannel
Description copied from class:RedisChatAPIGet the staff chat channel- Specified by:
getStaffChatChannelin classRedisChatAPI- Returns:
- The staff chat channel
-
setActiveChannel
Description copied from class:RedisChatAPISet the active channel for a player- Specified by:
setActiveChannelin classRedisChatAPI- Parameters:
playerName- The player namechannelName- The channel name
-
getActiveChannel
Description copied from class:RedisChatAPIGet the active channel for a player- Specified by:
getActiveChannelin classRedisChatAPI- Parameters:
playerName- The player name- Returns:
- The currently enabled channel
-
addVanishIntegration
Description copied from class:RedisChatAPIAdd vanish "canSee" integration- Specified by:
addVanishIntegrationin classRedisChatAPI- Parameters:
vanishIntegration- The vanish integration
-
removeVanishIntegration
Description copied from class:RedisChatAPIRemove vanish "canSee" integration- Specified by:
removeVanishIntegrationin classRedisChatAPI- Parameters:
vanishIntegration- The vanish integration
-
getAllChannels
-