Annotation Interface PluginDependency
Declares plugin dependencies for UltiTools plugins.
Used to ensure plugins are loaded in the correct order.
声明 UltiTools 插件的依赖关系。 用于确保插件按正确的顺序加载。
@UltiToolsModule(scanBasePackages = {"com.example.myplugin"})
@PluginDependency(
depends = {"CorePlugin", "UtilsPlugin"},
softDepends = {"OptionalPlugin"}
)
public class MyPlugin extends UltiToolsPlugin {
// ...
}
- Since:
- 6.2.0
- Author:
- wisdomme
-
Element Details
-
depends
String[] dependsRequired plugin dependencies. The plugin will fail to load if any of these dependencies are missing.
必需的插件依赖。 如果缺少任何这些依赖,插件将加载失败。- Returns:
- array of required plugin names
必需的插件名称数组
- Default:
{}
-
softDepends
String[] softDependsOptional plugin dependencies (soft dependencies). The plugin will still load even if these dependencies are missing, but it will be loaded after them if they exist.
可选的插件依赖(软依赖)。 即使缺少这些依赖,插件仍会加载, 但如果它们存在,会在它们之后加载。- Returns:
- array of optional plugin names
可选的插件名称数组
- Default:
{}
-
loadBefore
String[] loadBeforePlugins that should be loaded after this plugin. This is the inverse of depends - declares that other plugins depend on this one.
应在此插件之后加载的插件。 这与 depends 相反 - 声明其他插件依赖于此插件。- Returns:
- array of plugin names that should load after
应在之后加载的插件名称数组
- Default:
{}
-