Skip to content

Commit cf560e5

Browse files
committed
Added new placeholders for boss bar #426
1 parent 811641f commit cf560e5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/main/java/world/bentobox/aoneblock/listeners/BossBarListener.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ private void tryToShowBossBar(UUID uuid, Island island) {
117117
int phaseBlocks = addon.getOneBlockManager().getPhaseBlocks(obi);
118118
int done = phaseBlocks - numBlocksToGo;
119119
String translation = user.getTranslationOrNothing("aoneblock.bossbar.status", "[togo]",
120-
String.valueOf(numBlocksToGo), "[total]", String.valueOf(phaseBlocks), "[done]", String.valueOf(done));
120+
String.valueOf(numBlocksToGo), "[total]", String.valueOf(phaseBlocks), "[done]", String.valueOf(done),
121+
"[phase-name]", obi.getPhaseName(), "[percent-done]",
122+
Math.round(addon.getOneBlockManager().getPercentageDone(obi)) + "%");
121123
bar.setTitle(translation);
122124
// Add to user if they don't have it already
123125
Player player = Bukkit.getPlayer(uuid);

src/main/resources/locales/en-US.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ aoneblock:
2222
bossbar:
2323
title: "Blocks remaining"
2424
# status: "&a Phase blocks &b [total]. Blocks left: [todo]"
25+
# status: "&a [phase-name] : [percent-done]"
2526
status: "&a Phase blocks &b [done] &d / &b [total]"
2627
# RED, WHITE, PINK, BLUE, GREEN, YELLOW, or PURPLE
2728
color: RED

0 commit comments

Comments
 (0)