Package net.glowstone.entity.ai
Class EntityDirector
java.lang.Object
net.glowstone.entity.ai.EntityDirector
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<String>getEntityMobStateTask(org.bukkit.entity.EntityType entity, MobState state) Returns all registered task names for the given entity and mob state.static Class<? extends EntityTask>getEntityTask(String name) Returns the class registered for a given task name.static voidregisterEntityMobState(org.bukkit.entity.EntityType entity, MobState state, @NonNls String task) Registers a task name for the given entity and mob state.static voidregisterEntityTask(@NonNls String name, Class<? extends EntityTask> task) Registers a class for a given task name.
-
Constructor Details
-
EntityDirector
public EntityDirector()
-
-
Method Details
-
registerEntityMobState
public static void registerEntityMobState(org.bukkit.entity.EntityType entity, MobState state, @NonNls @NonNls String task) Registers a task name for the given entity and mob state.- Parameters:
entity- an entity typestate- a mob statetask- the name of a task
-
getEntityMobStateTask
public static Collection<String> getEntityMobStateTask(org.bukkit.entity.EntityType entity, MobState state) Returns all registered task names for the given entity and mob state.- Parameters:
entity- an entity typestate- a mob state- Returns:
- the names of the registered tasks
-
registerEntityTask
public static void registerEntityTask(@NonNls @NonNls String name, Class<? extends EntityTask> task) Registers a class for a given task name.- Parameters:
name- the task name that can subsequently be passed toregisterEntityMobState(org.bukkit.entity.EntityType, net.glowstone.entity.ai.MobState, java.lang.String)to invoke this tasktask- the class that implements the task
-
getEntityTask
Returns the class registered for a given task name.- Parameters:
name- the task name that can subsequently be passed toregisterEntityMobState(org.bukkit.entity.EntityType, net.glowstone.entity.ai.MobState, java.lang.String)to invoke this task- Returns:
- the class that implements the task, or null if none matches
-