|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwyvern.kernel.properties.PList
wyvern.kernel.maps.MapObject
wyvern.kernel.kernel.Bootstrap
Allows Wizards to be notified when the game starts up, so they can preload maps, start timers, register commands, install hooks, and so on.
To use a Bootstrap, create a subclass of it, in either Java or Jython, anywhere under your wiz directory. Have your subclass override the startup() method and do any initialization it needs there. It can also override shutdown() to perform cleanup code when the server is shutting down.
Then put a file called "bootstrap.arch" in your top-level wiz directory, referencing your subclass. If your wizard name is "bob", then your bootstrap.arch would look like this:
<arch path="wiz/bob/bootstrap/bootstrap.py"/>
(or)
<arch class="wiz/bob/bootstrap/Bootstrap.java"/>
The system will make one attempt to locate and load your bootstrap.arch. If it fails, it will print the error to your logs/error.log.
Bootstrap is an implementation of GameObject so you can clone it, to test your startup() and shutdown() code.
| Field Summary |
| Fields inherited from class wyvern.kernel.maps.MapObject |
IN_MAP_EDITOR, listenerList_ |
| Fields inherited from class wyvern.kernel.properties.PList |
readOnly_ |
| Fields inherited from interface wyvern.lib.PropertyList |
PROPERTY_PACKAGE |
| Constructor Summary | |
Bootstrap()
|
|
| Method Summary | |
static void |
loadBootstraps()
Attempts to load all the Wizard bootstrap objects. |
void |
shutdown()
Called when the system is shutting down, assuming it's not shutting down by crashing. |
static void |
shutdownBootstraps()
Calls shutdown() on all the wiz bootstrap objects. |
void |
startup()
Called when the system is starting up. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Bootstrap()
| Method Detail |
public static void loadBootstraps()
public static void shutdownBootstraps()
public void startup()
public void shutdown()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||