Spigot Plugin help

Status
This thread has been locked.

kevintr303

Feedback score
1
Posts
32
Reactions
6
Resources
0
I am trying to create a bossbar with mcmmo placeholders, but it isn't working. It doesn't show at all, so it's not that the placeholders aren't working as it would show as "%placeholder%" (right?)

Code:
@EventHandler(priority = EventPriority.HIGHEST)
    public void bossBarXP(PlayerJoinEvent e){
        Player player = e.getPlayer();
        String playerLevel = "%mcmmo_level_fishing%";
        String playerXP = "%mcmmo_xp_fishing%";
        String playerXPTotal = "%mcmmo_xp_needed_fishing";
        playerLevel = PlaceholderAPI.setPlaceholders(e.getPlayer(),playerLevel);
        playerXP = PlaceholderAPI.setPlaceholders(e.getPlayer(),playerXP);
        playerXPTotal = PlaceholderAPI.setPlaceholders(e.getPlayer(),playerXPTotal);
        BossBar bossBar = Bukkit.createBossBar("Level " + playerLevel + "  " +playerXP+"/"+playerXPTotal, BarColor.BLUE, BarStyle.SEGMENTED_10);
        if(!player.isDead()){
            bossBar.addPlayer(player);
            bossBar.setVisible(true);
        }

    }


shows up as:
unknown.png
I posted this on SpigotMC a couple days ago and have been bumping my thread, but no one seems to be helping me at all! So I hope someone from here can!
 
Last edited:
Status
This thread has been locked.
Top