Class PluginMessageListener
java.lang.Object
de.themoep.resourcepacksplugin.core.SubChannelHandler<net.md_5.bungee.api.connection.Server>
de.themoep.resourcepacksplugin.bungee.listeners.PluginMessageListener
- All Implemented Interfaces:
net.md_5.bungee.api.plugin.Listener
public class PluginMessageListener
extends SubChannelHandler<net.md_5.bungee.api.connection.Server>
implements net.md_5.bungee.api.plugin.Listener
-
Field Summary
Fields inherited from class de.themoep.resourcepacksplugin.core.SubChannelHandler
MESSAGING_CHANNEL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
Get the type that we are sending messages toprotected String
loadKey()
Load the key from the storagevoid
onServerSwitch
(net.md_5.bungee.api.event.ServerConnectedEvent event) void
pluginMessageReceived
(net.md_5.bungee.api.event.PluginMessageEvent event) protected void
Save the key used for authenticating communicationprotected void
sendPluginMessage
(net.md_5.bungee.api.connection.Server target, byte[] data) Methods inherited from class de.themoep.resourcepacksplugin.core.SubChannelHandler
acceptsNewKey, generateKey, handleMessage, readPack, registerSubChannel, reload, sendKey, sendMessage, setKey, trustsSender, writePack
-
Constructor Details
-
PluginMessageListener
-
-
Method Details
-
pluginMessageReceived
public void pluginMessageReceived(net.md_5.bungee.api.event.PluginMessageEvent event) -
onServerSwitch
public void onServerSwitch(net.md_5.bungee.api.event.ServerConnectedEvent event) -
sendPluginMessage
protected void sendPluginMessage(net.md_5.bungee.api.connection.Server target, byte[] data) - Specified by:
sendPluginMessage
in classSubChannelHandler<net.md_5.bungee.api.connection.Server>
-
saveKey
Description copied from class:SubChannelHandler
Save the key used for authenticating communication- Specified by:
saveKey
in classSubChannelHandler<net.md_5.bungee.api.connection.Server>
- Parameters:
key
- The key to set
-
loadKey
Description copied from class:SubChannelHandler
Load the key from the storage- Specified by:
loadKey
in classSubChannelHandler<net.md_5.bungee.api.connection.Server>
- Returns:
- The key (or null if none is stored)
-
getTargetType
Description copied from class:SubChannelHandler
Get the type that we are sending messages to- Specified by:
getTargetType
in classSubChannelHandler<net.md_5.bungee.api.connection.Server>
- Returns:
- The type
-