Package marauroa.server.game.rp
Class DebugInterface
java.lang.Object
marauroa.server.game.rp.DebugInterface
A interface which assists in debugging a server.
- Author:
- hendrik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
executeAction(RPObject object, RPAction action)
an action is about to be executedstatic DebugInterface
get()
gets the instance of the DebugInterfacevoid
reports crashesboolean
This method is called when a player leaves the gameboolean
This method is called when a player is added to the game worldThis method is called, when a message is receivedvoid
This method is called, when a message is receivedvoid
This method is called when connection to client is closedstatic void
set(DebugInterface debugInterface)
sets the instance of the DebugInterface
-
Constructor Details
-
DebugInterface
public DebugInterface()
-
-
Method Details
-
get
gets the instance of the DebugInterface- Returns:
- DebugInterface
-
set
sets the instance of the DebugInterface- Parameters:
debugInterface
- DebugInterface
-
executeAction
an action is about to be executed- Parameters:
object
- object belonging to the client requesting the actionaction
- action as sent from the client- Returns:
- true if the action should be executed; false if it should be skiped.
-
onInit
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
This method is called when a player leaves the game- Parameters:
object
- player object- Returns:
- true, to continue, false to prevent logout
-
onTimeout
This method is called when connection to client is closed- Parameters:
object
- player object
-
onCrash
reports crashes- Parameters:
object
- object
-
onMessage
This method is called, when a message is received- Parameters:
msg
- message
-
onMessage
This method is called, when a message is received- Parameters:
useragent
- browser and versionmsg
- message- Returns:
- msg
-