Class PluginMessageListener

java.lang.Object
de.themoep.resourcepacksplugin.core.SubChannelHandler<com.velocitypowered.api.proxy.server.RegisteredServer>
de.themoep.resourcepacksplugin.velocity.listeners.PluginMessageListener

public class PluginMessageListener extends SubChannelHandler<com.velocitypowered.api.proxy.server.RegisteredServer>
  • Constructor Details

  • Method Details

    • pluginMessageReceived

      public void pluginMessageReceived(com.velocitypowered.api.event.connection.PluginMessageEvent event)
    • onServerSwitch

      public void onServerSwitch(com.velocitypowered.api.event.player.ServerPostConnectEvent event)
    • sendPluginMessage

      protected void sendPluginMessage(com.velocitypowered.api.proxy.server.RegisteredServer target, byte[] data)
      Specified by:
      sendPluginMessage in class SubChannelHandler<com.velocitypowered.api.proxy.server.RegisteredServer>
    • saveKey

      protected void saveKey(String key)
      Description copied from class: SubChannelHandler
      Save the key used for authenticating communication
      Specified by:
      saveKey in class SubChannelHandler<com.velocitypowered.api.proxy.server.RegisteredServer>
      Parameters:
      key - The key to set
    • loadKey

      protected String loadKey()
      Description copied from class: SubChannelHandler
      Load the key from the storage
      Specified by:
      loadKey in class SubChannelHandler<com.velocitypowered.api.proxy.server.RegisteredServer>
      Returns:
      The key (or null if none is stored)
    • getTargetType

      protected String getTargetType()
      Description copied from class: SubChannelHandler
      Get the type that we are sending messages to
      Specified by:
      getTargetType in class SubChannelHandler<com.velocitypowered.api.proxy.server.RegisteredServer>
      Returns:
      The type