Common Examples
Dominion addon implementations based on real development tasks.
Example directory
| Example | Suitable for |
|---|---|
| Query the current claim | Menus, titles, messages, logs, and location-aware behavior |
| Member and claim operations | Automatically adding members, creating claims, or changing permissions |
| Listen for events | Entry/exit messages, creation interception, and operation-completion callbacks |
| Register a custom flag | Adding 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.