|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmultiverse.server.objects.ObjectFactory
public class ObjectFactory
Create objects for spawn generators. Sub-class to customize
spawned objects. Sub-classes should override
makeObject(multiverse.server.objects.SpawnData,long,multiverse.server.math.Point).
| Field Summary | |
|---|---|
private static Map<String,ObjectFactory> |
factories
|
protected String |
templateName
|
| Constructor Summary | |
|---|---|
ObjectFactory()
No-arg constructor used by WEObjFactory. |
|
ObjectFactory(String template)
Create objects using the named template. |
|
| Method Summary | |
|---|---|
static ObjectFactory |
getFactory(String factoryName)
Get registered object factory. |
String |
getTemplateName()
Get template for creating objects. |
ObjectStub |
makeObject(long instanceOid,
Point loc)
Deprecated. |
ObjectStub |
makeObject(long instanceOid,
Template override)
Deprecated. |
ObjectStub |
makeObject(SpawnData spawnData,
long instanceOid,
Point loc)
Create object at the given location. |
ObjectStub |
makeObject(SpawnData spawnData,
long instanceOid,
Template override)
Create object at the given location. |
static void |
register(String factoryName,
ObjectFactory factory)
Register an object factory. |
void |
setTemplateName(String templateName)
Set template for creating objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String templateName
private static Map<String,ObjectFactory> factories
| Constructor Detail |
|---|
public ObjectFactory()
public ObjectFactory(String template)
| Method Detail |
|---|
public ObjectStub makeObject(long instanceOid,
Point loc)
public ObjectStub makeObject(long instanceOid,
Template override)
public ObjectStub makeObject(SpawnData spawnData,
long instanceOid,
Point loc)
MobManagerPlugin.createObject().
Sub-classes should override this method to customize spawned objects.
public ObjectStub makeObject(SpawnData spawnData,
long instanceOid,
Template override)
MobManagerPlugin.createObject().
public String getTemplateName()
public void setTemplateName(String templateName)
public static void register(String factoryName,
ObjectFactory factory)
MobManagerClient.createSpawnGenerator(multiverse.server.objects.SpawnData)public static ObjectFactory getFactory(String factoryName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||