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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecuteAction(RPObject object, RPAction action)an action is about to be executedstatic DebugInterfaceget()gets the instance of the DebugInterfacevoidreports crashesbooleanThis method is called when a player leaves the gamebooleanThis method is called when a player is added to the game worldThis method is called, when a message is receivedvoidThis method is called, when a message is receivedvoidThis method is called when connection to client is closedstatic voidset(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
-