Skip to content

Commit 64f2121

Browse files
authored
Merge pull request #469 from BentoBoxWorld/461_No_support_for_HEX_colors_in_the_/ob_actionbar_command
461 no support for hex colors in the /ob actionbar command
2 parents 72fe06f + 2a57d47 commit 64f2121

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<!-- Do not change unless you want different name for local builds. -->
6666
<build.number>-LOCAL</build.number>
6767
<!-- This allows to change between versions. -->
68-
<build.version>1.22.0</build.version>
68+
<build.version>1.22.1</build.version>
6969
<!-- SonarCloud -->
7070
<sonar.projectKey>BentoBoxWorld_AOneBlock</sonar.projectKey>
7171
<sonar.organization>bentobox-world</sonar.organization>

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)