Promote via the API
Closed this issue ยท 6 comments
Hi,
how can I promote a user along a track via the API? This is not documented and I cannot find anything in the API to do so.
Thanks
Example:
public void givePermission(UUID uuid, String permission) {
UserManager userManager = luckPermsApi.getUserManager();
CompletableFuture<User> userFuture = userManager.loadUser(uuid);
userFuture.thenAcceptAsync(user -> {
user.addPermission(permission);
});
}
Node: to add a player in a group set the permission "group.groupName"
Sent from my Galaxy S8 using FastHub
This is not a real promotion. The plugin already knows which groups are in which track (including their order) and it should definitely find the next group by itself, without me explicitly telling the API what to do (although it should know what to do).
Sorry, but this is complete nonsense and the current API does not give pragmatic access to plugin funtionality. Besides, your example only covers the part of adding the group, but you omitted the unsetPermission part (which is also part of the promotion).
So if the API cannot promote users along a track, see this as a feature request.
promote
method in the Track
interface.