mcMMO Combat Level

mcMMO Combat Level

32.1k Downloads

MVdWPlaceholderAPI

madtomic opened this issue ยท 2 comments

commented
    if (getServer().getPluginManager().isPluginEnabled("MVdWPlaceholderAPI")) {
        PlaceholderAPI.registerPlaceholder(this, "combat_level", replaceEvent -> {
            if (!replaceEvent.isOnline()) {
                return "Player not online";
            }

            Player player = replaceEvent.getPlayer();
            OptionalInt combatLevel = getLevel(player);
            if (combatLevel.isPresent()) {
                return Integer.toString(combatLevel.getAsInt());
            }

            return "Level not loaded";
        });
    }

I just notice this. Should I be using this instead of the paperholderapi?

commented

When using combat_level, I only get Level not loaded message for the variable.

I am using version 2.1.1

I think this is still not fix when I revisit this old bug.

commented

The reason is your plugin that uses those data is requesting the combat level to earlier at the moment it's not loaded. As I said in the other ticket it's not possible to load it earlier because mcMMO provides no event for it.