Class DebugInterface

java.lang.Object
marauroa.server.game.rp.DebugInterface

public class DebugInterface extends Object
A interface which assists in debugging a server.
Author:
hendrik
  • Constructor Details

    • DebugInterface

      public DebugInterface()
  • Method Details

    • get

      public static DebugInterface get()
      gets the instance of the DebugInterface
      Returns:
      DebugInterface
    • set

      public static void set(DebugInterface debugInterface)
      sets the instance of the DebugInterface
      Parameters:
      debugInterface - DebugInterface
    • executeAction

      public boolean executeAction(RPObject object, RPAction action)
      an action is about to be executed
      Parameters:
      object - object belonging to the client requesting the action
      action - action as sent from the client
      Returns:
      true if the action should be executed; false if it should be skiped.
    • onInit

      public boolean onInit(RPObject object)
      This method is called when a player is added to the game world
      Parameters:
      object - player object
      Returns:
      true, to continue, false to cause an error
    • onExit

      public boolean onExit(RPObject object)
      This method is called when a player leaves the game
      Parameters:
      object - player object
      Returns:
      true, to continue, false to prevent logout
    • onTimeout

      public void onTimeout(RPObject object)
      This method is called when connection to client is closed
      Parameters:
      object - player object
    • onCrash

      public void onCrash(RPObject object)
      reports crashes
      Parameters:
      object - object
    • onMessage

      public void onMessage(Message msg)
      This method is called, when a message is received
      Parameters:
      msg - message
    • onMessage

      public String onMessage(String useragent, String msg)
      This method is called, when a message is received
      Parameters:
      useragent - browser and version
      msg - message
      Returns:
      msg