org.dimx
Class CustCmdProcessor

java.lang.Object
  extended by org.dimx.CustCmdProcessor
All Implemented Interfaces:
ISayProcessor, IWorldInitProcessor

public class CustCmdProcessor
extends java.lang.Object
implements ISayProcessor, IWorldInitProcessor

An implementation of a custom command processor for the DimensioneX Game Engine. The developer can use or subclass as needed. The custom processor should be defined as a WORLD attribute within the MyWorld.DXW file. Example:

 WORLD
     ...
     custCmdProc   org.dimx.CustCmdProcessor
     ...
     OTHER_TAGS
 
     END_OTHER_TAGS
 
 END_WORLD
 


Constructor Summary
CustCmdProcessor()
           
 
Method Summary
 boolean processPostWorldInit(multiplayer server, WorldLoader loader, World world, java.lang.String systemDir)
          Sample custom processor simply logs debug messages and returns 'true' to allow normal world.init to finalize.
 boolean processPreWorldInit(multiplayer server, WorldLoader loader, World world, java.lang.String systemDir)
          Sample custom processor simply logs a debug message and returns 'true' to allow normal world.init to occur.
 java.util.Vector processSay(multiplayer server, World world, java.lang.String cmd, java.lang.String arg1, java.lang.String arg2, Player player)
          Display ALL player SAY messages and chat in the Message panel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustCmdProcessor

public CustCmdProcessor()
Method Detail

processSay

public java.util.Vector processSay(multiplayer server,
                                   World world,
                                   java.lang.String cmd,
                                   java.lang.String arg1,
                                   java.lang.String arg2,
                                   Player player)
Display ALL player SAY messages and chat in the Message panel. If the player selects another player for the SAY then that player will receive the message but the selected player will NOT receiver player focus. If the player sends a generic message with [ENTER], or selects a non-player object then normal SAY processing occurs in addition to displaying the text in the player's message panel. The API is subject to change as the parent Interface becomes fully developed.

Specified by:
processSay in interface ISayProcessor
Parameters:
server -
world -
cmd -
arg1 -
arg2 -
player -
Returns:
NULL to continue with normal say processing; Vector(cmd,arg1,arg2) to override.

processPreWorldInit

public boolean processPreWorldInit(multiplayer server,
                                   WorldLoader loader,
                                   World world,
                                   java.lang.String systemDir)
Sample custom processor simply logs a debug message and returns 'true' to allow normal world.init to occur. This API is subject to change until it is fully developed.

Specified by:
processPreWorldInit in interface IWorldInitProcessor
Parameters:
server -
loader -
world -
systemDir -
Returns:
boolean true to allow normal world.init processing to continue; false to bypass normal world.init processing.

processPostWorldInit

public boolean processPostWorldInit(multiplayer server,
                                    WorldLoader loader,
                                    World world,
                                    java.lang.String systemDir)
Sample custom processor simply logs debug messages and returns 'true' to allow normal world.init to finalize. This API is subject to change until it is fully developed.

Specified by:
processPostWorldInit in interface IWorldInitProcessor
Parameters:
server -
loader -
world -
systemDir -
Returns:
boolean true to allow remaining init processing to continue; false to bypass remaining init processing.