API
EmakiSkills exposes script action registration and script casting services. Third-party plugins can register custom script actions to extend skill effects.
EmakiSkillsApi
Get the API from Bukkit ServicesManager:
java
RegisteredServiceProvider<EmakiSkillsApi> provider =
Bukkit.getServicesManager().getRegistration(EmakiSkillsApi.class);
if (provider != null) {
EmakiSkillsApi api = provider.getProvider();
}| Method | Return | Description |
|---|---|---|
scriptActionRegistry() | SkillScriptActionRegistry | Script action registry. |
scriptCastService() | SkillScriptCastService | Script cast service. |
SkillScriptActionRegistry
| Method | Description |
|---|---|
register(Plugin owner, SkillScriptAction action) | Register a custom action. |
unregister(String actionId) | Unregister one action. |
unregisterAll(Plugin owner) | Unregister all actions owned by a plugin. |
get(String actionId) | Get an action instance. |
ownerOf(String actionId) | Get action owner. |
all() | Get all registered actions. |
byOwner(Plugin owner) | Get all actions owned by a plugin. |
SkillScriptAction
java
public interface SkillScriptAction {
String id();
ActionStepResult execute(SkillScriptContext context, Map<String, String> arguments);
default String category() { return "custom"; }
default String description() { return ""; }
default List<ActionParameter> parameters() { return List.of(); }
default boolean acceptsDynamicParameter() { return false; }
default ActionExecutionMode executionMode() { return ActionExecutionMode.SYNC; }
default long timeoutMillis() { return 30000; }
default void validate() throws ActionSyntaxException {}
}Integration notes
- Add
softdepend: [EmakiSkills]in yourplugin.yml. - Use plugin-prefixed action ids to avoid conflicts.
- Do not call Bukkit API directly from asynchronous actions; switch back to the main thread first.
- Unregister actions when your plugin is disabled if needed.