use of org.bukkit.boss.BossBar in project Denizen-For-Bukkit by DenizenScript.
the class PlayerHelper_v1_10_R1 method showSimpleBossBar.
@Override
public void showSimpleBossBar(Player player, String title, double progress) {
UUID uuid = player.getUniqueId();
if (!bossBars.containsKey(uuid)) {
bossBars.put(uuid, new ArrayList<BossBar>());
}
List<BossBar> playerBars = bossBars.get(uuid);
if (!playerBars.isEmpty()) {
Iterator<BossBar> iterator = playerBars.iterator();
while (iterator.hasNext()) {
BossBar bossBar = iterator.next();
bossBar.removePlayer(player);
iterator.remove();
}
}
BossBar bossBar = Bukkit.createBossBar(title, BarColor.PURPLE, BarStyle.SOLID);
bossBar.setProgress(progress);
bossBar.addPlayer(player);
bossBar.setVisible(true);
playerBars.add(bossBar);
}
use of org.bukkit.boss.BossBar in project Denizen-For-Bukkit by DenizenScript.
the class PlayerHelper_v1_11_R1 method showSimpleBossBar.
@Override
public void showSimpleBossBar(Player player, String title, double progress) {
UUID uuid = player.getUniqueId();
if (!bossBars.containsKey(uuid)) {
bossBars.put(uuid, new ArrayList<BossBar>());
}
List<BossBar> playerBars = bossBars.get(uuid);
if (!playerBars.isEmpty()) {
Iterator<BossBar> iterator = playerBars.iterator();
while (iterator.hasNext()) {
BossBar bossBar = iterator.next();
bossBar.removePlayer(player);
iterator.remove();
}
}
BossBar bossBar = Bukkit.createBossBar(title, BarColor.PURPLE, BarStyle.SOLID);
bossBar.setProgress(progress);
bossBar.addPlayer(player);
bossBar.setVisible(true);
playerBars.add(bossBar);
}
use of org.bukkit.boss.BossBar in project Denizen-For-Bukkit by DenizenScript.
the class PlayerHelper_v1_9_R2 method showSimpleBossBar.
@Override
public void showSimpleBossBar(Player player, String title, double progress) {
UUID uuid = player.getUniqueId();
if (!bossBars.containsKey(uuid)) {
bossBars.put(uuid, new ArrayList<BossBar>());
}
List<BossBar> playerBars = bossBars.get(uuid);
if (!playerBars.isEmpty()) {
Iterator<BossBar> iterator = playerBars.iterator();
while (iterator.hasNext()) {
BossBar bossBar = iterator.next();
bossBar.removePlayer(player);
iterator.remove();
}
}
BossBar bossBar = Bukkit.createBossBar(title, BarColor.PURPLE, BarStyle.SOLID);
bossBar.setProgress(progress);
bossBar.addPlayer(player);
bossBar.setVisible(true);
playerBars.add(bossBar);
}
use of org.bukkit.boss.BossBar in project Denizen-For-Bukkit by DenizenScript.
the class PlayerHelper_v1_9_R2 method removeSimpleBossBar.
@Override
public void removeSimpleBossBar(Player player) {
UUID uuid = player.getUniqueId();
if (bossBars.containsKey(uuid) && !bossBars.get(uuid).isEmpty()) {
Iterator<BossBar> iterator = bossBars.get(uuid).iterator();
while (iterator.hasNext()) {
BossBar bossBar = iterator.next();
bossBar.removePlayer(player);
iterator.remove();
}
}
}
use of org.bukkit.boss.BossBar in project RedProtect by FabioZumbi12.
the class RPMine111 method sendBarMsg.
public static void sendBarMsg(String msg, String color, Player p) {
BossBar bar = Bukkit.createBossBar(msg, BarColor.valueOf(color), BarStyle.SEGMENTED_10);
bar.addPlayer(p);
removeBar(bar, p);
}
Aggregations