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?)
shows up as:
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!
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:
Last edited:
