Skip to content

Developer API

Depend on me.rexsystems:rexranks-api, or on the plugin jar, and get the service once RexRanks is enabled.

RexRanks api = RexRanksProvider.get();
api.getUserManager().loadUser(player.getUniqueId()).thenAccept(user -> {
user.data().add(Node.permission("essentials.fly"));
user.data().add(Node.prefix(100, "<gradient:#ff6b6b:#ffd93d>[Admin] "));
api.getUserManager().saveUser(user);
});
api.getEventBus().subscribe(myPlugin, UserPromoteEvent.class, event -> {
// ...
});

The API module is the rexranks-api artifact in the repository. Events cover permission changes, group changes, promote and demote, node expiry, and data reloads.