Hey spigot i'm trying to figure out how to send a bossbar to a player for only 10 sseconds. I know i have to use the Runnable, but i'm not good at Runnables. So can someone help me please? I'm trying to send this bossbar for 10 seconds: BossBar bb = Bukkit.createBossBar(ChatColor.translateAlternateColorCodes('&', "&b&lYea you did it!"), BarColor.GREEN, BarStyle.SOLID); Thanks!
not a runnable, you want to use bukkit scheduler to call this method, 10 seconds later: https://hub.spigotmc.org/javadocs/s...r.html#removePlayer-org.bukkit.entity.Player- to schedule it: https://hub.spigotmc.org/javadocs/b...bukkit.plugin.Plugin-java.lang.Runnable-long-
What have you tried so far? Boss Bar's api seems pretty simple, add the players you want then remove them after 10 seconds with a bukkit task (or BukkitRunnable would work)
Hmmm, send the bossbar first -> schedule a bukkit delayed task for 20L * 10L (10 seconds) -> on the run() method remove the bossbar.