Class ProxyBridgeCommon<P extends ConnectorPlugin<R>,R>

java.lang.Object
de.themoep.connectorplugin.BridgeCommon<P,R>
de.themoep.connectorplugin.ProxyBridgeCommon<P,R>
Direct Known Subclasses:
Bridge, Bridge

public abstract class ProxyBridgeCommon<P extends ConnectorPlugin<R>,R> extends BridgeCommon<P,R>
  • Constructor Details

    • ProxyBridgeCommon

      public ProxyBridgeCommon(P plugin)
  • Method Details

    • sendResponseData

      protected void sendResponseData(String target, byte[] out)
      Specified by:
      sendResponseData in class BridgeCommon<P extends ConnectorPlugin<R>,R>
    • runProxyConsoleCommand

      public CompletableFuture<Boolean> runProxyConsoleCommand(String command, Consumer<String>... consumer)
      Run a console command on all other proxies
      Parameters:
      command - The command to run
      consumer - Optional Consumer (or multiple) for the messages triggered by the command
      Returns:
      A future for whether the command was run successfully
    • onPlayerJoin

      protected void onPlayerJoin(BridgeCommon.PlayerInfo playerInfo)
    • onPlayerLeave

      protected void onPlayerLeave(String player)
    • registerServerCommands

      protected abstract void registerServerCommands(String server)
      Register all known commands on a server
      Parameters:
      server - The server
    • getPlayer

      protected abstract R getPlayer(String playerName)
      Get a player by name
      Parameters:
      playerName - The name of the player
      Returns:
      The player
    • createPlayerInfo

      public abstract BridgeCommon.PlayerInfo createPlayerInfo(R player)
      Create a player info object for a player
      Parameters:
      player - The player
      Returns:
      The player info object