Class EmotesProxyManager

java.lang.Object
io.github.kosmx.emotes.api.proxy.EmotesProxyManager

public abstract class EmotesProxyManager extends Object
some static methods to register received message and register proxy module
  • Field Details

  • Constructor Details

    • EmotesProxyManager

      public EmotesProxyManager()
  • Method Details

    • registerProxyInstance

      public static boolean registerProxyInstance(INetworkInstance instance)
      Register your proxy instance use AbstractNetworkInstance to create a new instance
      Parameters:
      instance - your instance
      Returns:
      true if registered ArrayList.add(Object)
    • unregisterProxyInstance

      public static boolean unregisterProxyInstance(INetworkInstance instance)
      Unregister your proxy instance Why were you doing that, you can use INetworkInstance.isActive() to temporally disable it
      Parameters:
      instance - instance to unregister
      Returns:
      if it was unregistered ArrayList.remove(Object)
    • getManager

      protected static EmotesProxyManager getManager()
      Make sure no-one can use this before EmoteX init
      Returns:
      manager
    • setManager

      protected static void setManager(EmotesProxyManager newManager)
      You can set manager only once. DO NOT DO IT
      Parameters:
      newManager - set it
    • dispatchReceive

      protected abstract void dispatchReceive(ByteBuffer buffer, UUID player, INetworkInstance networkInstance)
    • onDisconnectFromServer

      public abstract void onDisconnectFromServer(INetworkInstance networkInstance)