Class Channel
java.lang.Object
me.hsgamer.hscore.bungeecord.channel.Channel
The base channel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Get the channel's namenet.md_5.bungee.api.plugin.Plugin
Get the plugin providing the channelabstract void
handleMessage
(net.md_5.bungee.api.event.PluginMessageEvent event) Handle the received data from plugin messagingvoid
register()
Register the channelvoid
send
(net.md_5.bungee.api.config.ServerInfo server, byte[] data) Send the data to a servervoid
send
(net.md_5.bungee.api.connection.ProxiedPlayer player, byte[] data) Send the data to a playervoid
sendAll
(byte[] data) Send the data to all serversvoid
sendAll
(byte[] data, boolean hasPlayer) Send the data to all serversvoid
Unregister the channel
-
Constructor Details
-
Channel
Create a new channel- Parameters:
name
- the channel nameplugin
- the plugin
-
-
Method Details
-
register
public void register()Register the channel -
unregister
public void unregister()Unregister the channel -
handleMessage
public abstract void handleMessage(net.md_5.bungee.api.event.PluginMessageEvent event) Handle the received data from plugin messaging- Parameters:
event
- the plugin message event
-
sendAll
public void sendAll(byte[] data) Send the data to all servers- Parameters:
data
- the data
-
sendAll
public void sendAll(byte[] data, boolean hasPlayer) Send the data to all servers- Parameters:
data
- the datahasPlayer
- check if the server has players
-
send
public void send(net.md_5.bungee.api.config.ServerInfo server, byte[] data) Send the data to a server- Parameters:
server
- the serverdata
- the data
-
send
public void send(net.md_5.bungee.api.connection.ProxiedPlayer player, byte[] data) Send the data to a player- Parameters:
player
- the playerdata
- the data
-
getName
Get the channel's name- Returns:
- the name
-
getPlugin
public net.md_5.bungee.api.plugin.Plugin getPlugin()Get the plugin providing the channel- Returns:
- the plugin
-