Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/world/bentobox/aoneblock/AOneBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class AOneBlock extends GameModeAddon {
.defaultSetting(false)
.build();
private BossBarListener bossBar = new BossBarListener(this);
public final Flag BOSSBAR = new Flag.Builder("BOSSBAR", Material.DRAGON_HEAD).mode(Mode.BASIC)
public final Flag ONEBLOCK_BOSSBAR = new Flag.Builder("ONEBLOCK_BOSSBAR", Material.DRAGON_HEAD).mode(Mode.BASIC)
.type(Type.SETTING).listener(bossBar).defaultSetting(true).build();

@Override
Expand All @@ -93,7 +93,7 @@ public void onLoad() {
// Register protection flag with BentoBox
getPlugin().getFlagsManager().registerFlag(this, START_SAFETY);
// Bossbar
getPlugin().getFlagsManager().registerFlag(this, this.BOSSBAR);
getPlugin().getFlagsManager().registerFlag(this, this.ONEBLOCK_BOSSBAR);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void setup() {
public boolean execute(User user, String label, List<String> args) {
addon.getBossBar().toggleUser(user);
getIslands().getIslandAt(user.getLocation()).ifPresent(i -> {
if (!i.isAllowed(addon.BOSSBAR)) {
if (!i.isAllowed(addon.ONEBLOCK_BOSSBAR)) {
user.sendMessage("aoneblock.bossbar.not-active");
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void onEnterIsland(IslandEnterEvent event) {

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

// Only show if enabled for island
if (!island.isAllowed(addon.BOSSBAR)) {
if (!island.isAllowed(addon.ONEBLOCK_BOSSBAR)) {
BossBar removed = islandBossBars.remove(island);
if (removed != null) {
// Remove all players from the boss bar
Expand Down
43 changes: 43 additions & 0 deletions src/main/resources/phases/12000_lush_caves.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
'12000':
name: Lush Caves
icon: MOSS_BLOCK
firstBlock: MOSS_BLOCK
biome: LUSH_CAVES
fixedBlocks:
'0': MOSS_BLOCK
'1': MOSS_CARPET
'2': AZALEA
'3': AZALEA_LEAVES
'4': MOSSY_COBBLESTONE
'5': SPORE_BLOSSOM
blocks:
CHEST: 60
GLOW_LICHEN: 50
CAVE_VINES_PLANT: 60
AZALEA_LEAVES: 80
SPORE_BLOSSOM: 40
MOSSY_COBBLESTONE: 150
STONE: 500
MOSSY_STONE_BRICKS: 100
CAVE_VINES: 60
MOSS_BLOCK: 300
MOSS_CARPET: 200
AZALEA: 100
ROOTED_DIRT: 100
mobs:
AXOLOTL: 20
BAT: 150
GLOW_SQUID: 20
CREEPER: 50
SKELETON: 50
SLIME: 50
SPIDER: 50
ZOMBIE: 55
ENDERMAN: 5
WITCH: 3
ZOMBIE_VILLAGER: 3
TROPICAL_FISH: 20
holograms:
'0': '&aWelcome to the Lush Caves!'
start-commands: []
end-commands: []
Loading