Skip to content

Commit 2d9138d

Browse files
authored
Merge pull request #438 from BentoBoxWorld/437_new_bossbar_setting_locale
437 new bossbar setting locale
2 parents 049383d + d07200c commit 2d9138d

17 files changed

+3084
-6
lines changed

src/main/java/world/bentobox/aoneblock/AOneBlock.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class AOneBlock extends GameModeAddon {
6767
.defaultSetting(false)
6868
.build();
6969
private BossBarListener bossBar = new BossBarListener(this);
70-
public final Flag BOSSBAR = new Flag.Builder("BOSSBAR", Material.DRAGON_HEAD).mode(Mode.BASIC)
70+
public final Flag ONEBLOCK_BOSSBAR = new Flag.Builder("ONEBLOCK_BOSSBAR", Material.DRAGON_HEAD).mode(Mode.BASIC)
7171
.type(Type.SETTING).listener(bossBar).defaultSetting(true).build();
7272

7373
@Override
@@ -93,7 +93,7 @@ public void onLoad() {
9393
// Register protection flag with BentoBox
9494
getPlugin().getFlagsManager().registerFlag(this, START_SAFETY);
9595
// Bossbar
96-
getPlugin().getFlagsManager().registerFlag(this, this.BOSSBAR);
96+
getPlugin().getFlagsManager().registerFlag(this, this.ONEBLOCK_BOSSBAR);
9797
}
9898
}
9999

src/main/java/world/bentobox/aoneblock/commands/island/IslandBossBarCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void setup() {
2828
public boolean execute(User user, String label, List<String> args) {
2929
addon.getBossBar().toggleUser(user);
3030
getIslands().getIslandAt(user.getLocation()).ifPresent(i -> {
31-
if (!i.isAllowed(addon.BOSSBAR)) {
31+
if (!i.isAllowed(addon.ONEBLOCK_BOSSBAR)) {
3232
user.sendMessage("aoneblock.bossbar.not-active");
3333
}
3434
});

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void onEnterIsland(IslandEnterEvent event) {
5656

5757
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
5858
public void onFlagChange(FlagSettingChangeEvent e) {
59-
if (e.getEditedFlag() == addon.BOSSBAR) {
59+
if (e.getEditedFlag() == addon.ONEBLOCK_BOSSBAR) {
6060
// Show to players on island. If it isn't allowed then this will clean up the boss bar too
6161
e.getIsland().getPlayersOnIsland().stream().map(Player::getUniqueId)
6262
.forEach(uuid -> this.tryToShowBossBar(uuid, e.getIsland()));
@@ -72,7 +72,7 @@ private void tryToShowBossBar(UUID uuid, Island island) {
7272
User user = User.getInstance(uuid);
7373

7474
// Only show if enabled for island
75-
if (!island.isAllowed(addon.BOSSBAR)) {
75+
if (!island.isAllowed(addon.ONEBLOCK_BOSSBAR)) {
7676
BossBar removed = islandBossBars.remove(island);
7777
if (removed != null) {
7878
// Remove all players from the boss bar
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
'12000':
2+
name: Lush Caves
3+
icon: MOSS_BLOCK
4+
firstBlock: MOSS_BLOCK
5+
biome: LUSH_CAVES
6+
fixedBlocks:
7+
'0': MOSS_BLOCK
8+
'1': MOSS_CARPET
9+
'2': AZALEA
10+
'3': AZALEA_LEAVES
11+
'4': MOSSY_COBBLESTONE
12+
'5': SPORE_BLOSSOM
13+
blocks:
14+
CHEST: 60
15+
GLOW_LICHEN: 50
16+
CAVE_VINES_PLANT: 60
17+
AZALEA_LEAVES: 80
18+
SPORE_BLOSSOM: 40
19+
MOSSY_COBBLESTONE: 150
20+
STONE: 500
21+
MOSSY_STONE_BRICKS: 100
22+
CAVE_VINES: 60
23+
MOSS_BLOCK: 300
24+
MOSS_CARPET: 200
25+
AZALEA: 100
26+
ROOTED_DIRT: 100
27+
mobs:
28+
AXOLOTL: 20
29+
BAT: 150
30+
GLOW_SQUID: 20
31+
CREEPER: 50
32+
SKELETON: 50
33+
SLIME: 50
34+
SPIDER: 50
35+
ZOMBIE: 55
36+
ENDERMAN: 5
37+
WITCH: 3
38+
ZOMBIE_VILLAGER: 3
39+
TROPICAL_FISH: 20
40+
holograms:
41+
'0': '&aWelcome to the Lush Caves!'
42+
start-commands: []
43+
end-commands: []

0 commit comments

Comments
 (0)