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 gameonFileRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String url) This method is called, when there is an web request for a filebooleanThis 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 receivedvoidonRPObjectInteraction(RPObject rpobject1, RPObject rpobject2) This method is called, when there is an interaction of two RPObjectsvoidThis 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
-
onRPObjectInteraction
This method is called, when there is an interaction of two RPObjects- Parameters:
rpobject1- first RPObjectrpobject2- second RPObbject
-
onFileRequest
public InputStream onFileRequest(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String url) This method is called, when there is an web request for a file- Parameters:
request- request objectresponse- response object to send the file tourl- url of the request- Returns:
- InputStream or
null
-