Skip to content

Commit 2a57d47

Browse files
committed
Fixes hex colors in action bar text. #461
1 parent 6f57d80 commit 2a57d47

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import world.bentobox.aoneblock.AOneBlock;
2323
import world.bentobox.aoneblock.dataobjects.OneBlockIslands;
2424
import world.bentobox.aoneblock.events.MagicBlockEvent;
25+
import world.bentobox.bentobox.BentoBox;
2526
import world.bentobox.bentobox.api.events.flags.FlagSettingChangeEvent;
2627
import world.bentobox.bentobox.api.events.island.IslandEnterEvent;
2728
import world.bentobox.bentobox.api.events.island.IslandExitEvent;
@@ -110,12 +111,13 @@ private void tryToShowActionBar(UUID uuid, Island island) {
110111
int numBlocksToGo = addon.getOneBlockManager().getNextPhaseBlocks(obi);
111112
int phaseBlocks = addon.getOneBlockManager().getPhaseBlocks(obi);
112113
int done = phaseBlocks - numBlocksToGo;
113-
String translation = user.getTranslationOrNothing("aoneblock.actionbar.status", "[togo]",
114+
String translation = user.getTranslationNoColor("aoneblock.actionbar.status", "[togo]",
114115
String.valueOf(numBlocksToGo), "[total]", String.valueOf(phaseBlocks), "[done]", String.valueOf(done),
115116
"[phase-name]", obi.getPhaseName(), "[percent-done]",
116117
Math.round(addon.getOneBlockManager().getPercentageDone(obi)) + "%");
117118
// Send
118-
player.sendActionBar(bukkitToAdventure(translation));
119+
Component comp = bukkitToAdventure(translation);
120+
player.sendActionBar(comp);
119121
}
120122
/**
121123
* Try to show the bossbar to the player

0 commit comments

Comments
 (0)