NametagEdit

721k Downloads

[DEV] Access to sortPriority?

maxsaintbas opened this issue ยท 0 comments

commented

Not really an issue, but a question.

SortPriority Function?

I'm currently working on a Core at the moment, and I'm using NTE to set the nameplates for groups (I'm not using any permissions plugin, I have a Group class that handles commands with "power-level" instead).

// Nameplate function
    private void func_00106(UUID uuid) throws NotIngameException {
        GamePlayer gamePlayer = GameServer.getPlayer(uuid);
        String prefix = gamePlayer.getDisplayGroup().d;
        String suffix = "";
        int sortPriority = gamePlayer.getDisplayGroup().sort;

        if (Module.isModule(Module.HUB)) { // Server is in LobbyMode
            prefix = gamePlayer.getDisplayGroup().e;
            suffix = gamePlayer.getSuffix();
        } else {
            prefix = gamePlayer.getGame().gameManager.getTeam().e;
            sortPriority = gamePlayer.getGame().gameManager.getTeam().sort;
        }

        NametagEdit.getApi().setNametag(gamePlayer.bukkit(), prefix, suffix);
        // sortPriorityFunction() ?
    }

As you can see, in the very bottom, I set the player's nameplate according, but I can't find anything that will allow me to set the priority as well. When I've tried experimenting with the API, I found the INametag.class allows for me to get the nameplate sort priority, but not set it? How can I set the sortPriority without having to use the config in NTE?