Common Examples
Docs/dominion-api/Common Examples

Common Examples

Dominion addon implementations based on real development tasks.

Example directory

ExampleSuitable for
Query the current claimMenus, titles, messages, logs, and location-aware behavior
Member and claim operationsAutomatically adding members, creating claims, or changing permissions
Listen for eventsEntry/exit messages, creation interception, and operation-completion callbacks
Register a custom flagAdding a Dominion-managed rule to an addon

Shared assumptions

The examples assume that onEnable() has already completed the following:

DominionAPI api = DominionAPI.getInstance();
getServer().getPluginManager().registerEvents(this, this);

In a real project, also declare depend: [ Dominion ] in plugin.yml or implement a soft-dependency check. Handle null, exceptions, and thread switching for every Future.