Java Code Examples for org.bukkit.boss.BarColor#GREEN
The following examples show how to use
org.bukkit.boss.BarColor#GREEN .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BukkitBossBarFactory.java From helper with MIT License | 6 votes |
private static BarColor convertColor(BossBarColor color) { switch (color) { case PINK: return BarColor.PINK; case BLUE: return BarColor.BLUE; case RED: return BarColor.RED; case GREEN: return BarColor.GREEN; case YELLOW: return BarColor.YELLOW; case PURPLE: return BarColor.PURPLE; case WHITE: return BarColor.WHITE; default: return convertColor(BossBarColor.defaultColor()); } }
Example 2
Source File: TimeLimitCountdown.java From ProjectAres with GNU Affero General Public License v3.0 | 5 votes |
@Override public BarColor barColor(Player viewer) { long seconds = remaining.getSeconds(); if(seconds > 60) { return BarColor.GREEN; } else if(seconds > 30) { return BarColor.YELLOW; } else { return BarColor.RED; } }
Example 3
Source File: FlagBossbar.java From HeavySpleef with GNU General Public License v3.0 | 5 votes |
@Override public void onFlagAdd(Game game) { baseTitle = getI18N().getVarString(Messages.Broadcast.BOSSBAR_PLAYING_ON) .setVariable("game", game.getName()) .toString(); baseColor = new SafeContainer<>(BarColor.GREEN); bossBar = new SafeContainer<>(Bukkit.getServer().createBossBar(baseTitle, baseColor.value, BarStyle.SOLID)); bossBar.value.setProgress(DEFAULT_PROGRESS); }
Example 4
Source File: StartCountdown.java From ProjectAres with GNU Affero General Public License v3.0 | 4 votes |
@Override public BarColor barColor(Player viewer) { return BarColor.GREEN; }