Class ProxyPackListener

java.lang.Object
de.themoep.resourcepacksplugin.core.SubChannelHandler<org.bukkit.entity.Player>
de.themoep.resourcepacksplugin.bukkit.listeners.ProxyPackListener
All Implemented Interfaces:
org.bukkit.event.Listener, org.bukkit.plugin.messaging.PluginMessageListener

public class ProxyPackListener extends SubChannelHandler<org.bukkit.entity.Player> implements org.bukkit.plugin.messaging.PluginMessageListener, org.bukkit.event.Listener
Created by Phoenix616 on 02.02.2016.
  • Constructor Details

  • Method Details

    • onPluginMessageReceived

      public void onPluginMessageReceived(String channel, org.bukkit.entity.Player p, byte[] message)
      Specified by:
      onPluginMessageReceived in interface org.bukkit.plugin.messaging.PluginMessageListener
    • onPlayerJoin

      public void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent event)
    • sendPluginMessage

      protected void sendPluginMessage(org.bukkit.entity.Player target, byte[] data)
      Specified by:
      sendPluginMessage in class SubChannelHandler<org.bukkit.entity.Player>
    • saveKey

      protected void saveKey(String key)
      Description copied from class: SubChannelHandler
      Save the key used for authenticating communication
      Specified by:
      saveKey in class SubChannelHandler<org.bukkit.entity.Player>
      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<org.bukkit.entity.Player>
      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<org.bukkit.entity.Player>
      Returns:
      The type
    • trustsSender

      protected boolean trustsSender()
      Description copied from class: SubChannelHandler
      Check whether this implementation can trust the sender
      Overrides:
      trustsSender in class SubChannelHandler<org.bukkit.entity.Player>
      Returns:
      Whether the sender can be trusted or not