Package me.hsgamer.hscore.bukkit.channel
Class BungeeSubChannel
java.lang.Object
me.hsgamer.hscore.bukkit.channel.Channel
me.hsgamer.hscore.bukkit.channel.BungeeSubChannel
- All Implemented Interfaces:
org.bukkit.plugin.messaging.PluginMessageListener
The sub-channel for the main BungeeCord channel
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBungeeSubChannel(String subChannel, org.bukkit.plugin.Plugin plugin) Create a new sub-channel -
Method Summary
Modifier and TypeMethodDescriptionGet the sub-channel namevoidhandleMessage(org.bukkit.entity.Player player, byte[] data) Handle the received data from plugin messagingabstract voidhandleSubChannelMessage(org.bukkit.entity.Player player, byte[] data) Handle the received data from plugin messaging through sub-channelvoidsend(org.bukkit.plugin.messaging.PluginMessageRecipient recipient, byte[] data) Send the data via the sub-channel with the recipientvoidsendForward(String toServer, byte[] data) Forward the data to other serversvoidsendForward(org.bukkit.plugin.messaging.PluginMessageRecipient recipient, String toServer, byte[] data) Forward the data to other serversMethods inherited from class me.hsgamer.hscore.bukkit.channel.Channel
getName, getPlugin, onPluginMessageReceived, register, send, unregister
-
Field Details
-
logger
The logger for ease
-
-
Constructor Details
-
BungeeSubChannel
Create a new sub-channel- Parameters:
subChannel- the sub-channel nameplugin- the plugin
-
-
Method Details
-
getSubChannel
Get the sub-channel name- Returns:
- the sub-channel name
-
sendForward
public void sendForward(org.bukkit.plugin.messaging.PluginMessageRecipient recipient, String toServer, byte[] data) Forward the data to other servers- Parameters:
recipient- the recipienttoServer- the server to forwarddata- the data
-
sendForward
Forward the data to other servers- Parameters:
toServer- the server to forwarddata- the data
-
handleSubChannelMessage
public abstract void handleSubChannelMessage(org.bukkit.entity.Player player, byte[] data) Handle the received data from plugin messaging through sub-channel- Parameters:
player- the player involveddata- the data
-
handleMessage
public void handleMessage(org.bukkit.entity.Player player, byte[] data) Description copied from class:ChannelHandle the received data from plugin messaging- Specified by:
handleMessagein classChannel- Parameters:
player- the player involveddata- the data
-
send
public void send(org.bukkit.plugin.messaging.PluginMessageRecipient recipient, byte[] data) Send the data via the sub-channel with the recipient
-