Package net.sf.gridarta.plugin
Class PluginExecutor<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.plugin.PluginExecutor<G,A,R>
-
public class PluginExecutor<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends java.lang.ObjectAllows execution ofPlugins.
-
-
Constructor Summary
Constructors Constructor Description PluginExecutor(@NotNull PluginModel<G,A,R> pluginModel, @NotNull PluginParameters pluginParameters)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable BshRunnable<G,A,R>doRunPlugin(@NotNull Plugin<G,A,R> plugin, @NotNull bsh.ConsoleInterface console, @NotNull java.util.Map<java.lang.String,java.lang.Object> parameters)Runs a plugin model.intexecutePlugin(@NotNull java.lang.String plugin, @NotNull java.lang.Iterable<java.lang.String> parameters)Executes an editor plugin.
-
-
-
Constructor Detail
-
PluginExecutor
public PluginExecutor(@NotNull @NotNull PluginModel<G,A,R> pluginModel, @NotNull @NotNull PluginParameters pluginParameters)Creates a new instance.- Parameters:
pluginModel- the plugin model to executepluginParameters- the parameters to pass to the plugin
-
-
Method Detail
-
executePlugin
public int executePlugin(@NotNull @NotNull java.lang.String plugin, @NotNull @NotNull java.lang.Iterable<java.lang.String> parameters)Executes an editor plugin.- Parameters:
plugin- the plugin name to executeparameters- the plugin parameters- Returns:
- whether an error occurred
-
doRunPlugin
@Nullable public @Nullable BshRunnable<G,A,R> doRunPlugin(@NotNull @NotNull Plugin<G,A,R> plugin, @NotNull @NotNull bsh.ConsoleInterface console, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> parameters)
Runs a plugin model.- Parameters:
plugin- the plugin modelconsole- the console to useparameters- the parameters to pass to the plugin- Returns:
- the thread executing the script
-
-