Skip to content

Java API

Orven edited this page Oct 10, 2026 · 1 revision

Java API and extensions

Language: English | Русская версия

UIcore exposes a Java API for plugins that want to add menu actions, provide data, evaluate conditions, or register custom components. The API module is separate from the plugin implementation.

Maven dependency

<dependency>
  <groupId>org.orvencraft.uicore</groupId>
  <artifactId>uicore-api</artifactId>
  <version>1.0.0</version>
  <scope>provided</scope>
</dependency>

Declare UIcore as a softdepend if your extension can run without it, or as a required dependency if it cannot. Compile against the published API artifact and use the API interfaces rather than implementation classes.

Extension capabilities

  • Register namespaced action handlers for menu interactions.
  • Provide simple data values to menu text and element properties.
  • Evaluate custom visibility and interaction conditions.
  • Add reusable custom menu components that create element definitions.
  • Refresh a player's open menu when data changes.

Use stable, namespaced identifiers such as example:player_level. Validate parameters, keep work bounded, and follow the server scheduler requirements when interacting with Bukkit objects. On Folia, player and world access must run in the owning region.

References

See the full Extension API guide, API usage examples, and example extension source.

Clone this wiki locally