public class DefaultScriptedEventFactory extends AbstractScriptedEventFactory<GameObject,MapArchObject,Archetype>
AbstractScriptedEventFactory
for creating Crossfire
related instances.Constructor and Description |
---|
DefaultScriptedEventFactory(ScriptArchUtils scriptArchUtils,
java.lang.String subtypeAttribute,
GameObjectFactory<GameObject,MapArchObject,Archetype> gameObjectFactory,
ScriptedEventEditor<GameObject,MapArchObject,Archetype> scriptedEventEditor,
ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
ScriptedEvent<GameObject,MapArchObject,Archetype> |
newScriptedEvent(GameObject event)
Creates a new
ScriptedEvent instance. |
ScriptedEvent<GameObject,MapArchObject,Archetype> |
newScriptedEvent(int eventType,
java.lang.String pluginName,
java.lang.String scriptPath,
java.lang.String options)
Creates a new
ScriptedEvent instance. |
newEventGameObject
public DefaultScriptedEventFactory(@NotNull ScriptArchUtils scriptArchUtils, @NotNull java.lang.String subtypeAttribute, @NotNull GameObjectFactory<GameObject,MapArchObject,Archetype> gameObjectFactory, @NotNull ScriptedEventEditor<GameObject,MapArchObject,Archetype> scriptedEventEditor, @NotNull ArchetypeSet<GameObject,MapArchObject,Archetype> archetypeSet)
scriptArchUtils
- the script arch utils instance to usesubtypeAttribute
- the attribute name for the subtype fieldgameObjectFactory
- the game object factory for creating game
objectsscriptedEventEditor
- the scripted event editor to usearchetypeSet
- the archetype set to use@NotNull public ScriptedEvent<GameObject,MapArchObject,Archetype> newScriptedEvent(int eventType, @NotNull java.lang.String pluginName, @NotNull java.lang.String scriptPath, @NotNull java.lang.String options) throws UndefinedEventArchetypeException
ScriptedEvent
instance.eventType
- type of the eventpluginName
- name of the pluginscriptPath
- path to the file for this eventoptions
- the options for this eventUndefinedEventArchetypeException
- In case there is no Archetype to
create a ScriptedEvent.@NotNull public ScriptedEvent<GameObject,MapArchObject,Archetype> newScriptedEvent(GameObject event)
ScriptedEvent
instance.event
- the event game object