From c21423accf74b58405ebbef11f6a07c83831eb51 Mon Sep 17 00:00:00 2001 From: BONNe Date: Sun, 16 Apr 2023 19:46:55 +0300 Subject: [PATCH 01/11] Init 1.19.0 version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c43b69f..f25683b 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ ${build.version}-SNAPSHOT - 1.18.0 + 1.19.0 -LOCAL bentobox-world https://sonarcloud.io From 6e7b235e7487a58456e878bfc686db90cabf4f85 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 24 Jun 2023 13:01:57 -0700 Subject: [PATCH 02/11] Update Github Action build script --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db8c77b..60c51d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,21 +11,21 @@ jobs: name: Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Set up JDK 17 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: java-version: 17 - name: Cache SonarCloud packages - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Cache Maven packages - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ~/.m2 key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} From 3bf71e1b9819e8df1a51e0e0eef2579ae36c037e Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 24 Jun 2023 13:52:00 -0700 Subject: [PATCH 03/11] Add required distribution --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60c51d4..17b8df6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,7 @@ jobs: - name: Set up JDK 17 uses: actions/setup-java@v3 with: + distribution: 'adopt' java-version: 17 - name: Cache SonarCloud packages uses: actions/cache@v3 From 77c058b7fdd1ace2315e4863e6ba96914ed3a41e Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 10 Jul 2023 21:32:47 -0700 Subject: [PATCH 04/11] Update Jacoco --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f25683b..d9f5530 100644 --- a/pom.xml +++ b/pom.xml @@ -229,7 +229,7 @@ org.jacoco jacoco-maven-plugin - 0.8.3 + 0.8.11 true From 4d8b1c66496a61cc6fa8c75a15a99f261a42585a Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 10 Jul 2023 21:36:26 -0700 Subject: [PATCH 05/11] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d9f5530..7b2cea4 100644 --- a/pom.xml +++ b/pom.xml @@ -229,7 +229,7 @@ org.jacoco jacoco-maven-plugin - 0.8.11 + 0.8.10 true From 1b4c4f86a85f5c522f822305cd85604604813860 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 12 Nov 2023 13:51:32 -0800 Subject: [PATCH 06/11] BentoBox 2.0.0 API --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d9f5530..42b6048 100644 --- a/pom.xml +++ b/pom.xml @@ -45,8 +45,8 @@ UTF-8 17 - 1.19.4-R0.1-SNAPSHOT - 1.23.0 + 1.20.2-R0.1-SNAPSHOT + 2.0.0-SNAPSHOT ${build.version}-SNAPSHOT From 9e51156f87cc2817c21b6d8c6d58e29388272853 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 26 Nov 2023 07:59:48 -0800 Subject: [PATCH 07/11] Avoid min and max y settings for ores. Fixes #91 --- .../populators/NewMaterialPopulator.java | 175 ++++++++++-------- 1 file changed, 94 insertions(+), 81 deletions(-) diff --git a/src/main/java/world/bentobox/caveblock/generators/populators/NewMaterialPopulator.java b/src/main/java/world/bentobox/caveblock/generators/populators/NewMaterialPopulator.java index 11f1074..75e217f 100644 --- a/src/main/java/world/bentobox/caveblock/generators/populators/NewMaterialPopulator.java +++ b/src/main/java/world/bentobox/caveblock/generators/populators/NewMaterialPopulator.java @@ -1,16 +1,22 @@ package world.bentobox.caveblock.generators.populators; +import java.util.ArrayList; +import java.util.Collections; +import java.util.EnumMap; +import java.util.List; +import java.util.Map; +import java.util.Random; + import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; import org.bukkit.generator.BlockPopulator; import org.bukkit.generator.LimitedRegion; import org.bukkit.generator.WorldInfo; + import world.bentobox.caveblock.Utils; import world.bentobox.caveblock.generators.Ore; -import java.util.*; - /** * @author tastybento */ @@ -19,95 +25,102 @@ public class NewMaterialPopulator extends BlockPopulator { private static final Map> ORES; static { - Map> ores = new EnumMap<>(World.Environment.class); - // Source https://minecraft.fandom.com/wiki/Blob - List worldOres = new ArrayList<>(); - worldOres.add(new Ore(-64, 7, Material.DEEPSLATE_DIAMOND_ORE, 1, 10, true)); - worldOres.add(new Ore(7, 16, Material.DIAMOND_ORE, 1, 10, true)); - worldOres.add(new Ore(-64, 7, Material.DEEPSLATE_LAPIS_ORE, 1, 7, true)); - worldOres.add(new Ore(7, 64, Material.LAPIS_ORE, 1, 7, true)); - worldOres.add(new Ore(-64, 7, Material.DEEPSLATE_GOLD_ORE, 2, 9, true)); - worldOres.add(new Ore(7, 30, Material.GOLD_ORE, 2, 9, true)); - worldOres.add(new Ore(0, 16, Material.TUFF, 2, 33, false)); - worldOres.add(new Ore(-64, 7, Material.DEEPSLATE_REDSTONE_ORE, 8, 8, true)); - worldOres.add(new Ore(7, 16, Material.REDSTONE_ORE, 8, 8, true)); - worldOres.add(new Ore(0, 16, Material.GRAVEL, 8, 33, false)); - worldOres.add(new Ore(0, 79, Material.GRANITE, 5, 33, false)); - worldOres.add(new Ore(0, 79, Material.ANDESITE, 5, 33, false)); - worldOres.add(new Ore(0, 79, Material.DIORITE, 5, 33, false)); - worldOres.add(new Ore(32, 320, Material.EMERALD_ORE, 11, 1, true)); - worldOres.add(new Ore(95, 136, Material.COAL_ORE, 20, 17, false)); - worldOres.add(new Ore(0, 7, Material.DEEPSLATE_COPPER_ORE, 20, 9, true)); - worldOres.add(new Ore(7, 96, Material.COPPER_ORE, 20, 9, true)); - worldOres.add(new Ore(-64, 7, Material.DEEPSLATE_IRON_ORE, 20, 9, true)); - worldOres.add(new Ore(7, 320, Material.IRON_ORE, 20, 9, true)); - worldOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8, 33, false)); - ores.put(World.Environment.NORMAL, worldOres); - List netherOres = new ArrayList<>(); - netherOres.add(new Ore(1, 22, Material.ANCIENT_DEBRIS, 1, 5, true)); - netherOres.add(new Ore(-64, 30, Material.NETHER_GOLD_ORE, 2, 9, true)); - netherOres.add(new Ore(0, 16, Material.GRAVEL, 8, 33, false)); - netherOres.add(new Ore(0, 320, Material.BASALT, 8, 33, false)); - netherOres.add(new Ore(0, 320, Material.BLACKSTONE, 8, 33, false)); - netherOres.add(new Ore(0, 320, Material.FIRE, 8, 33, false)); - netherOres.add(new Ore(200, 320, Material.GLOWSTONE, 8, 33, false)); - netherOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8, 33, false)); - netherOres.add(new Ore(-64, 320, Material.LAVA, 8, 33, false)); - netherOres.add(new Ore(0, 16, Material.MAGMA_BLOCK, 8, 33, false)); - netherOres.add(new Ore(0, 320, Material.CRIMSON_FUNGUS, 8, 33, false)); - netherOres.add(new Ore(0, 320, Material.WARPED_FUNGUS, 8, 33, false)); - netherOres.add(new Ore(0, 320, Material.CRIMSON_NYLIUM, 8, 33, false)); - netherOres.add(new Ore(0, 320, Material.WARPED_NYLIUM, 8, 33, false)); - netherOres.add(new Ore(0, 320, Material.SHROOMLIGHT, 8, 33, false)); - netherOres.add(new Ore(0, 320, Material.CRIMSON_STEM, 8, 33, false)); - netherOres.add(new Ore(0, 320, Material.WARPED_STEM, 8, 33, false)); - netherOres.add(new Ore(-64, 34, Material.SOUL_SOIL, 20, 17, false)); - netherOres.add(new Ore(0, 96, Material.NETHER_QUARTZ_ORE, 20, 9, true)); - netherOres.add(new Ore(-64, 320, Material.BONE_BLOCK, 20, 9, true)); - ores.put(World.Environment.NETHER, netherOres); - List endOres = new ArrayList<>(); - endOres.add(new Ore(32, 320, Material.PURPUR_BLOCK, 11, 1, true)); - endOres.add(new Ore(95, 136, Material.OBSIDIAN, 20, 17, false)); - endOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8, 33, false)); - ores.put(World.Environment.THE_END, endOres); - ORES = Collections.unmodifiableMap(ores); + Map> ores = new EnumMap<>(World.Environment.class); + // Source https://minecraft.fandom.com/wiki/Blob + List worldOres = new ArrayList<>(); + worldOres.add(new Ore(-64, 7, Material.DEEPSLATE_DIAMOND_ORE, 1, 10, true)); + worldOres.add(new Ore(7, 16, Material.DIAMOND_ORE, 1, 10, true)); + worldOres.add(new Ore(-64, 7, Material.DEEPSLATE_LAPIS_ORE, 1, 7, true)); + worldOres.add(new Ore(7, 64, Material.LAPIS_ORE, 1, 7, true)); + worldOres.add(new Ore(-64, 7, Material.DEEPSLATE_GOLD_ORE, 2, 9, true)); + worldOres.add(new Ore(7, 30, Material.GOLD_ORE, 2, 9, true)); + worldOres.add(new Ore(0, 16, Material.TUFF, 2, 33, false)); + worldOres.add(new Ore(-64, 7, Material.DEEPSLATE_REDSTONE_ORE, 8, 8, true)); + worldOres.add(new Ore(7, 16, Material.REDSTONE_ORE, 8, 8, true)); + worldOres.add(new Ore(0, 16, Material.GRAVEL, 8, 33, false)); + worldOres.add(new Ore(0, 79, Material.GRANITE, 5, 33, false)); + worldOres.add(new Ore(0, 79, Material.ANDESITE, 5, 33, false)); + worldOres.add(new Ore(0, 79, Material.DIORITE, 5, 33, false)); + worldOres.add(new Ore(32, 320, Material.EMERALD_ORE, 11, 1, true)); + worldOres.add(new Ore(95, 136, Material.COAL_ORE, 20, 17, false)); + worldOres.add(new Ore(0, 7, Material.DEEPSLATE_COPPER_ORE, 20, 9, true)); + worldOres.add(new Ore(7, 96, Material.COPPER_ORE, 20, 9, true)); + worldOres.add(new Ore(-64, 7, Material.DEEPSLATE_IRON_ORE, 20, 9, true)); + worldOres.add(new Ore(7, 320, Material.IRON_ORE, 20, 9, true)); + worldOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8, 33, false)); + ores.put(World.Environment.NORMAL, worldOres); + List netherOres = new ArrayList<>(); + netherOres.add(new Ore(1, 22, Material.ANCIENT_DEBRIS, 1, 5, true)); + netherOres.add(new Ore(-64, 30, Material.NETHER_GOLD_ORE, 2, 9, true)); + netherOres.add(new Ore(0, 16, Material.GRAVEL, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.BASALT, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.BLACKSTONE, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.FIRE, 8, 33, false)); + netherOres.add(new Ore(200, 320, Material.GLOWSTONE, 8, 33, false)); + netherOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8, 33, false)); + netherOres.add(new Ore(-64, 320, Material.LAVA, 8, 33, false)); + netherOres.add(new Ore(0, 16, Material.MAGMA_BLOCK, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.CRIMSON_FUNGUS, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.WARPED_FUNGUS, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.CRIMSON_NYLIUM, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.WARPED_NYLIUM, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.SHROOMLIGHT, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.CRIMSON_STEM, 8, 33, false)); + netherOres.add(new Ore(0, 320, Material.WARPED_STEM, 8, 33, false)); + netherOres.add(new Ore(-64, 34, Material.SOUL_SOIL, 20, 17, false)); + netherOres.add(new Ore(0, 96, Material.NETHER_QUARTZ_ORE, 20, 9, true)); + netherOres.add(new Ore(-64, 320, Material.BONE_BLOCK, 20, 9, true)); + ores.put(World.Environment.NETHER, netherOres); + List endOres = new ArrayList<>(); + endOres.add(new Ore(32, 320, Material.PURPUR_BLOCK, 11, 1, true)); + endOres.add(new Ore(95, 136, Material.OBSIDIAN, 20, 17, false)); + endOres.add(new Ore(-64, 320, Material.CAVE_AIR, 8, 33, false)); + ores.put(World.Environment.THE_END, endOres); + ORES = Collections.unmodifiableMap(ores); } private final int worldDepth; + /** + * @param worldDepth - Depth. If depth is set smaller than the world height, + * then the area above will be empty. Should not be less than + * cave height. + */ public NewMaterialPopulator(int worldDepth) { - this.worldDepth = worldDepth; + this.worldDepth = worldDepth; } @Override public void populate(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion) { - final int worldHeight = Math.min(worldInfo.getMaxHeight(), this.worldDepth); - for (int y = worldInfo.getMinHeight(); y < worldHeight - 1; y++) { - for (Ore o : ORES.get(worldInfo.getEnvironment())) { - if (y > o.minY() && y < o.maxY() && random.nextInt(100) <= o.chance()) { - pasteBlob(worldInfo, random, chunkX, chunkZ, limitedRegion, y, o); - if (o.cont()) { - break; - } - } - } - } + final int worldHeight = Math.min(worldInfo.getMaxHeight(), this.worldDepth); + for (int y = worldInfo.getMinHeight() + 1; y < worldHeight - 1; y++) { + for (Ore o : ORES.get(worldInfo.getEnvironment())) { + if (y > o.minY() && y < o.maxY() && random.nextInt(100) <= o.chance()) { + pasteBlob(worldInfo, random, chunkX, chunkZ, limitedRegion, y, o); + if (o.cont()) { + break; + } + } + } + } } - private void pasteBlob(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion, int y, Ore o) { - int offset = random.nextInt(16); - for (int x = Math.max(0, offset - BLOB_SIZE); x < Math.min(16, offset + BLOB_SIZE); x++) { - for (int z = Math.max(0, offset - BLOB_SIZE); z < Math.min(16, offset + BLOB_SIZE); z++) { - for (int yy = Math.max(worldInfo.getMinHeight(), y - BLOB_SIZE); yy < Math.min(worldInfo.getMaxHeight(), y + BLOB_SIZE); yy++) { - Location location = Utils.getLocationFromChunkLocation(x, yy, z, chunkX, chunkZ); - if (!limitedRegion.isInRegion(location)) { - continue; - } - if (limitedRegion.getType(location).isSolid() && random.nextBoolean()) { - limitedRegion.setType(location, o.material()); - } - } - } - } + private void pasteBlob(WorldInfo worldInfo, Random random, int chunkX, int chunkZ, LimitedRegion limitedRegion, + int y, Ore o) { + int offset = random.nextInt(16); + for (int x = Math.max(0, offset - BLOB_SIZE); x < Math.min(16, offset + BLOB_SIZE); x++) { + for (int z = Math.max(0, offset - BLOB_SIZE); z < Math.min(16, offset + BLOB_SIZE); z++) { + for (int yy = Math.max(worldInfo.getMinHeight() + 1, y - BLOB_SIZE); yy < Math + .min(worldInfo.getMaxHeight() - 1, y + BLOB_SIZE); yy++) { + Location location = Utils.getLocationFromChunkLocation(x, yy, z, chunkX, chunkZ); + if (!limitedRegion.isInRegion(location)) { + continue; + } + if (limitedRegion.getType(location).isSolid() && random.nextBoolean()) { + limitedRegion.setType(location, o.material()); + } + } + } + } } } From aa6bd08027c26545400cc3feeae1b4291e32a232 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 3 Dec 2023 12:32:40 -0800 Subject: [PATCH 08/11] Update README.md --- README.md | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d754351..80662f1 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,54 @@ [![Discord](https://img.shields.io/discord/272499714048524288.svg?logo=discord)](https://discord.bentobox.world) [![Build Status](https://ci.codemc.org/buildStatus/icon?job=BentoBoxWorld/CaveBlock)](https://ci.codemc.org/job/BentoBoxWorld/job/CaveBlock/) -CaveBlock is an addon for BentoBox, so to run CaveBlock, you must have BentoBox installed. It is not a Bukkit plugin and trying to use it as one will not work. +# Welcome to CaveBlock for BentoBox! -## Translation +🌌 **Embark on a Subterranean Adventure!** + +CaveBlock is an enthralling GameMode addon for BentoBox, designed to take your Minecraft experience to new depths. In this unique underground world, every adventure, challenge, and mystery lies beneath the surface. + + + +## What is CaveBlock? + +CaveBlock transforms the familiar Minecraft landscape into a vast underground realm. As a player, you begin your journey in a modest cave, equipped with only essential items. Your mission is to mine, explore, and expand your subterranean domain. + +### Key Features: + +- **Start Small, Dream Big:** Begin in a small cave and use your mining skills to expand your territory. +- **Treasure Hunting:** Delve deeper to discover hidden treasures and rare resources. +- **Beware of the Dark:** Monsters lurk in the shadows. Prepare for encounters with creatures of the deep. +- **Build and Craft:** Utilize your resources to craft tools, build structures, and create your own underground empire. + +## Getting Started with CaveBlock + +CaveBlock is an addon for BentoBox, a Bukkit plugin for Minecraft. To dive into this underground adventure, you'll need to have BentoBox installed on your Minecraft server. + +### Installation: + +1. **Install BentoBox:** Make sure BentoBox is installed and running on your server. +2. **Download CaveBlock:** Get the CaveBlock addon from the [official download site](https://download.bentobox.world). Or download from the releases in this repo. +3. **Add to BentoBox:** Place the CaveBlock file in your BentoBox addons folder. +4. **Restart Your Server:** Once installed, restart your server to activate CaveBlock. + +### Dive Into the Depths! + +Are you ready to explore the unknown and carve out your own piece of the underground world? Download CaveBlock now and start your subterranean adventure! + +🔍 **Stay Updated:** For the latest updates, follow our [Discord](https://discord.gg/tqQbNA5X9A). + +--- + +*Note: CaveBlock is constantly being updated with new features and improvements. Keep an eye on our release notes for the latest enhancements.* + +**Happy Mining!** 🌐🛠️👾 + +## Translations Like most BentoBox projects, the CaveBlock Addon is translatable into any language. Everyone can contribute, and translate some parts of the addon into their language via [GitLocalize](https://gitlocalize.com/repo/2968). If your language is not in the list, please contact the developers via Discord, and it will be added. -## Installation +## Full Installation Instructions 0. Install BentoBox and run it on the server at least once to create its data folders. 1. Place this jar in the addons folder of the BentoBox plugin. From 3694f86839a1d00b04e262053424e8910d8f86de Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 2 Jul 2024 11:14:32 -0700 Subject: [PATCH 09/11] Return the Pladdon that was created. --- .../java/world/bentobox/caveblock/CaveBlockPladdon.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java b/src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java index da0d0d7..f996155 100644 --- a/src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java +++ b/src/main/java/world/bentobox/caveblock/CaveBlockPladdon.java @@ -7,8 +7,13 @@ public class CaveBlockPladdon extends Pladdon { + private Addon addon; + @Override public Addon getAddon() { - return new CaveBlock(); + if (addon == null) { + addon = new CaveBlock(); + } + return addon; } } From 30534ec0cab59e86a512fe9a5377dcc4dec49fd2 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 17 Aug 2024 10:00:03 -0700 Subject: [PATCH 10/11] Add config settings for latest BentoBox API https://github.com/BentoBoxWorld/BentoBox/issues/2470 --- pom.xml | 2 +- .../world/bentobox/caveblock/Settings.java | 3285 +++++++++-------- src/main/resources/addon.yml | 2 +- 3 files changed, 1664 insertions(+), 1625 deletions(-) diff --git a/pom.xml b/pom.xml index 39c1722..aa44183 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ 17 1.20.2-R0.1-SNAPSHOT - 2.0.0-SNAPSHOT + 2.5.0-SNAPSHOT ${build.version}-SNAPSHOT diff --git a/src/main/java/world/bentobox/caveblock/Settings.java b/src/main/java/world/bentobox/caveblock/Settings.java index 4d32700..a62acff 100644 --- a/src/main/java/world/bentobox/caveblock/Settings.java +++ b/src/main/java/world/bentobox/caveblock/Settings.java @@ -1,7 +1,13 @@ package world.bentobox.caveblock; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.bukkit.Difficulty; import org.bukkit.GameMode; @@ -12,14 +18,12 @@ import com.google.common.base.Enums; +import world.bentobox.bentobox.BentoBox; import world.bentobox.bentobox.api.configuration.ConfigComment; import world.bentobox.bentobox.api.configuration.ConfigEntry; import world.bentobox.bentobox.api.configuration.StoreAt; import world.bentobox.bentobox.api.configuration.WorldSettings; import world.bentobox.bentobox.api.flags.Flag; -import world.bentobox.bentobox.database.objects.adapters.Adapter; -import world.bentobox.bentobox.database.objects.adapters.FlagSerializer; -import world.bentobox.bentobox.database.objects.adapters.FlagSerializer2; /** @@ -30,2696 +34,2731 @@ @ConfigComment("CaveBlock Configuration [version]") public class Settings implements WorldSettings { - // --------------------------------------------------------------------- - // Section: Getters - // --------------------------------------------------------------------- - - /** - * @return the maxCoopSize - */ - @Override - public int getMaxCoopSize() { - return maxCoopSize; - } - /** - * @return the maxTrustSize - */ - @Override - public int getMaxTrustSize() { - return maxTrustSize; - } + /* Commands */ + @ConfigComment("Cave Command. What command users will run to access their cave.") + @ConfigComment("To define alias, just separate commands with white space.") + @ConfigEntry(path = "caveblock.command.cave") + private String playerCommandAliases = "cave cb"; - /** - * This method returns the friendlyName object. - * @return the friendlyName object. - */ - @Override - public String getFriendlyName() - { - return friendlyName; - } + @ConfigComment("The Cave admin command.") + @ConfigComment("To define alias, just separate commands with white space.") + @ConfigEntry(path = "caveblock.command.admin") + private String adminCommandAliases = "cbadmin cba"; + @ConfigComment("The default action for new player command call.") + @ConfigComment("Sub-command of main player command that will be run on first player command call.") + @ConfigComment("By default it is sub-command 'create'.") + @ConfigEntry(path = "caveblock.command.new-player-action", since = "1.13.0") + private String defaultNewPlayerAction = "create"; - /** - * This method returns the worldName object. - * @return the worldName object. - */ - @Override - public String getWorldName() - { - return worldName; - } + @ConfigComment("The default action for player command.") + @ConfigComment("Sub-command of main player command that will be run on each player command call.") + @ConfigComment("By default it is sub-command 'go'.") + @ConfigEntry(path = "caveblock.command.default-action", since = "1.13.0") + private String defaultPlayerAction = "go"; + /* WORLD */ + @ConfigComment("Friendly name for this world. Used in admin commands. Must be a single word") + @ConfigEntry(path = "world.friendly-name") + private String friendlyName = "CaveBlock"; - /** - * This method returns the difficulty object. - * @return the difficulty object. - */ - @Override - public Difficulty getDifficulty() - { - return difficulty; - } + @ConfigComment("Name of the world - if it does not exist then it will be generated.") + @ConfigComment("It acts like a prefix for nether and end (e.g. CaveBlock-world, CaveBlock-world_nether, CaveBlock-world_end)") + @ConfigEntry(path = "world.world-name") + private String worldName = "caveblock-world"; + @ConfigComment("World difficulty setting - PEACEFUL, EASY, NORMAL, HARD") + @ConfigComment("Other plugins may override this setting") + @ConfigEntry(path = "world.difficulty") + private Difficulty difficulty = Difficulty.HARD; - /** - * This method returns the islandDistance object. - * @return the islandDistance object. - */ - @Override - public int getIslandDistance() - { - return islandDistance; - } + @ConfigComment("Spawn limits. These override the limits set in bukkit.yml") + @ConfigComment("If set to a negative number, the server defaults will be used") + @ConfigEntry(path = "world.spawn-limits.monsters", since = "1.15.1") + private int spawnLimitMonsters = -1; + @ConfigEntry(path = "world.spawn-limits.animals", since = "1.15.1") + private int spawnLimitAnimals = -1; + @ConfigEntry(path = "world.spawn-limits.water-animals", since = "1.15.1") + private int spawnLimitWaterAnimals = -1; + @ConfigEntry(path = "world.spawn-limits.ambient", since = "1.15.1") + private int spawnLimitAmbient = -1; + @ConfigComment("Setting to 0 will disable animal spawns, but this is not recommended. Minecraft default is 400.") + @ConfigComment("A negative value uses the server default") + @ConfigEntry(path = "world.spawn-limits.ticks-per-animal-spawns", since = "1.15.1") + private int ticksPerAnimalSpawns = -1; + @ConfigComment("Setting to 0 will disable monster spawns, but this is not recommended. Minecraft default is 400.") + @ConfigComment("A negative value uses the server default") + @ConfigEntry(path = "world.spawn-limits.ticks-per-monster-spawns", since = "1.15.1") + private int ticksPerMonsterSpawns = -1; + @ConfigComment("Radius of cave in blocks. (So distance between caves is twice this)") + @ConfigComment("Will be rounded up to the nearest 16 blocks.") + @ConfigComment("It is the same for every dimension : Overworld, Nether and End.") + @ConfigComment("This value cannot be changed mid-game and the plugin will not start if it is different.") + @ConfigEntry(path = "world.distance-between-caves", needsReset = true) + private int islandDistance = 100; - /** - * This method returns the islandProtectionRange object. - * @return the islandProtectionRange object. - */ - @Override - public int getIslandProtectionRange() - { - return islandProtectionRange; - } + @ConfigComment("Default protection range radius in blocks. Cannot be larger than distance.") + @ConfigComment("Admins can change protection sizes for players individually using /cbadmin range set ") + @ConfigComment("or set this permission: caveblock.island.range.") + @ConfigEntry(path = "world.protection-range") + private int islandProtectionRange = 50; + @ConfigComment("Start caves at these coordinates. This is where new caves will start in the") + @ConfigComment("world. These must be a factor of your cave distance, but the plugin will auto") + @ConfigComment("calculate the closest location on the grid. Caves develop around this location") + @ConfigComment("both positively and negatively in a square grid.") + @ConfigComment("If none of this makes sense, leave it at 0,0.") + @ConfigEntry(path = "world.start-x", needsReset = true) + private int islandStartX = 0; - /** - * This method returns the islandStartX object. - * @return the islandStartX object. - */ - @Override - public int getIslandStartX() - { - return islandStartX; - } + @ConfigEntry(path = "world.start-z", needsReset = true) + private int islandStartZ = 0; + @ConfigEntry(path = "world.offset-x") + private int islandXOffset; + @ConfigEntry(path = "world.offset-z") + private int islandZOffset; - /** - * This method returns the islandStartZ object. - * @return the islandStartZ object. - */ - @Override - public int getIslandStartZ() - { - return islandStartZ; - } + @ConfigComment("Cave height - Lowest is 5.") + @ConfigComment("It is the y coordinate of the bedrock block in the schem.") + @ConfigEntry(path = "world.cave-height") + private int islandHeight = 60; + @ConfigComment("Maximum number of caves in the world. Set to -1 or 0 for unlimited.") + @ConfigComment("If the number of caves is greater than this number, it will stop players from creating caves.") + @ConfigEntry(path = "world.max-caves") + private int maxIslands = -1; - /** - * This method returns the islandXOffset object. - * @return the islandXOffset object. - */ - @Override - public int getIslandXOffset() - { - return islandXOffset; - } + @ConfigComment("The number of concurrent caves a player can have") + @ConfigComment("A value of 0 will use the BentoBox config.yml default") + @ConfigEntry(path = "world.concurrent-caves") + private int concurrentIslands = 0; + @ConfigComment("Disallow team members from having their own caves.") + @ConfigEntry(path = "world.disallow-team-member-caves") + private boolean disallowTeamMemberIslands = true; - /** - * This method returns the islandZOffset object. - * @return the islandZOffset object. - */ - @Override - public int getIslandZOffset() - { - return islandZOffset; - } + @ConfigComment("The default game mode for this world. Players will be set to this mode when they create") + @ConfigComment("a new cave for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR") + @ConfigEntry(path = "world.default-game-mode") + private GameMode defaultGameMode = GameMode.SURVIVAL; + @ConfigComment("The default biome for the overworld") + @ConfigEntry(path = "world.default-biome") + private Biome defaultBiome = Enums.getIfPresent(Biome.class, "DRIPSTONE_CAVES").or(Biome.THE_VOID); - /** - * This method returns the islandHeight object. - * @return the islandHeight object. - */ - @Override - public int getIslandHeight() - { - return islandHeight; - } + @ConfigComment("The maximum number of players a player can ban at any one time in this game mode.") + @ConfigComment("The permission caveblock.ban.maxlimit.X where X is a number can also be used per player") + @ConfigComment("-1 = unlimited") + @ConfigEntry(path = "world.ban-limit") + private int banLimit = -1; + @ConfigComment("") + @ConfigComment("This is cave.. no height... only depth. If depth is set smaller than maximal world height, then area above will be empty.") + @ConfigComment("Should not be less than cave height.") + @ConfigEntry(path = "world.world-depth", needsReset = true) + private int worldDepth = 256; - /** - * This is not an option in Caveblock - * @return false - */ - @Override - public boolean isUseOwnGenerator() - { - return false; - } + @ConfigComment("This indicate how many times block should be tried to generate.") + @ConfigEntry(path = "world.generation-tries", needsReset = true) + private int numberOfBlockGenerationTries = 1; + @ConfigComment("Should we use the new material generator ?") + @ConfigComment("This will generate ores and blocks similar to how vanilla does,") + @ConfigComment("but it will override the blocks settings of each world.") + @ConfigEntry(path = "world.use-new-material-generator", needsReset = true) + private boolean newMaterialGenerator = false; - /** - * This method returns the seaHeight object. - * @return the seaHeight object. - */ - @Override - public int getSeaHeight() - { - return 0; - } + @ConfigComment("") + @ConfigComment("Make over world roof of bedrock, if false, it will be made from stone.") + @ConfigEntry(path = "world.normal.roof", needsReset = true) + private boolean normalRoof = true; + @ConfigComment("") + @ConfigComment("Option allows to toggle if world generator should generate natural(-ish) looking surface with dirt and grass blocks.") + @ConfigComment("Enabling this option will ignore roof setting.") + @ConfigComment("Default value is false.") + @ConfigEntry(path = "world.normal.natural-surface", needsReset = true, experimental = true) + private boolean generateNaturalSurface = false; - /** - * 0 or -1 is unlimited. It will block cave creation if the cave count for the world is higher than this. - * @return the maxIslands - */ - @Override - public int getMaxIslands() - { - return maxIslands; - } + @ConfigComment("") + @ConfigComment("Option allows to toggle if world generator should generate natural looking caves.") + @ConfigComment("Default value is false.") + @ConfigEntry(path = "world.normal.natural-caves", needsReset = true) + private boolean generateCaves = false; + @ConfigComment("Make over world floor of bedrock, if false, it will be made from stone.") + @ConfigEntry(path = "world.normal.floor", needsReset = true) + private boolean normalFloor = true; - /** - * This method returns the defaultGameMode object. - * @return the defaultGameMode object. - */ - @Override - public GameMode getDefaultGameMode() - { - return defaultGameMode; - } + @ConfigComment("") + @ConfigComment("Option allows to toggle if world generator should generate natural looking bedrock block patterns.") + @ConfigComment("Enabling this option will ignore floor setting.") + @ConfigComment("Default value is false.") + @ConfigEntry(path = "world.normal.natural-bedrock", needsReset = true) + private boolean generateNaturalBedrock = false; + @ConfigComment("Main block of which world will be generated.") + @ConfigEntry(path = "world.normal.main-block", needsReset = true) + private Material normalMainBlock = Material.STONE; - /** - * This method returns the defaultBiome object. - * @return the defaultBiome object. - */ - public Biome getDefaultBiome() - { - return defaultBiome; - } + @ConfigComment("Blocks that will occasionally replace main block by random chance.") + @ConfigComment("Blocks will replace only main-block and will try to create packs that") + @ConfigComment("are set in their strings. Chance of spawning also is required.") + @ConfigComment("For materials first string must be MATERIAL, for entity: ENTITY.") + @ConfigComment("Entities spawned via generator are not protected from despawing.") + @ConfigComment("Working only with 2 high mobs currently.") + @ConfigComment("Example:") + @ConfigComment("MATERIAL:DIAMOND_ORE:100:5 - means there is 100% chace of spawing diamonds") + @ConfigComment("where max amount in pack are 5 per each subchunk!") + @ConfigEntry(path = "world.normal.blocks", needsReset = true) + private List normalBlocks = new ArrayList<>(); + // Nether + @ConfigComment("Generate Nether - if this is false, the nether world will not be made and access to") + @ConfigComment("the nether will not occur. Other plugins may still enable portal usage.") + @ConfigComment("Note: Some default challenges will not be possible if there is no nether.") + @ConfigComment("Note that with a standard nether all players arrive at the same portal and entering a") + @ConfigComment("portal will return them back to their caves.") + @ConfigEntry(path = "world.nether.generate") + private boolean netherGenerate = true; - /** - * This method returns the banLimit object. - * @return the banLimit object. - */ - @Override - public int getBanLimit() - { - return banLimit; - } + @ConfigComment("Caves in Nether. Change to false for standard vanilla nether.") + @ConfigEntry(path = "world.nether.caves", needsReset = true) + private boolean netherIslands = true; + @ConfigComment("The default biome for the nether world (this may affect what mobs can spawn)") + @ConfigEntry(path = "world.nether.biome", since = "1.14.0") + private Biome defaultNetherBiome = Enums.getIfPresent(Biome.class, "NETHER_WASTES").or(Biome.THE_VOID); - /** - * This method returns the netherGenerate object. - * @return the netherGenerate object. - */ - @Override - public boolean isNetherGenerate() - { - return netherGenerate; - } + @ConfigComment("Nether spawn protection radius - this is the distance around the nether spawn") + @ConfigComment("that will be protected from player interaction (breaking blocks, pouring lava etc.)") + @ConfigComment("Minimum is 0 (not recommended), maximum is 100. Default is 25.") + @ConfigComment("Only applies to vanilla nether") + @ConfigEntry(path = "world.nether.spawn-radius") + private int netherSpawnRadius = 32; + @ConfigComment("Make over world roof of bedrock, if false, it will be made from stone") + @ConfigEntry(path = "world.nether.roof", needsReset = true) + private boolean netherRoof = true; - /** - * This method returns the netherIslands object. - * @return the netherIslands object. - */ - @Override - public boolean isNetherIslands() - { - return netherIslands; - } + @ConfigComment("Make over world floor of bedrock, if false, it will be made from stone") + @ConfigEntry(path = "world.nether.floor", needsReset = true) + private boolean netherFloor = true; + @ConfigComment("Main block of which world will be generated.") + @ConfigEntry(path = "world.nether.main-block", needsReset = true) + private Material netherMainBlock = Material.NETHERRACK; - /** - * This method returns the netherRoof object. - * @return the netherRoof object. - */ - public boolean isNetherRoof() - { - return netherRoof; - } + @ConfigComment("Blocks that will occasionally replace main block by random chance.") + @ConfigComment("Blocks will replace only main-block and will try to create packs that") + @ConfigComment("are set in their strings. Chance of spawning also is required.") + @ConfigComment("For materials first string must be MATERIAL, for entity: ENTITY.") + @ConfigComment("Entities spawned via generator are not protected from despawing.") + @ConfigComment("Working only with 2 high mobs currently.") + @ConfigComment("Example:") + @ConfigComment("MATERIAL:DIAMOND_ORE:100:5 - means there is 100% chace of spawing diamonds") + @ConfigComment("where max amount in pack are 5 per each subchunk!") + @ConfigEntry(path = "world.nether.blocks", needsReset = true) + private List netherBlocks = new ArrayList<>(); + @ConfigComment("This option indicates if nether portals should be linked via dimensions.") + @ConfigComment("Option will simulate vanilla portal mechanics that links portals together") + @ConfigComment("or creates a new portal, if there is not a portal in that dimension.") + @ConfigEntry(path = "world.nether.create-and-link-portals") + private boolean makeNetherPortals = false; - /** - * This method returns the netherSpawnRadius object. - * @return the netherSpawnRadius object. - */ - @Override - public int getNetherSpawnRadius() - { - return netherSpawnRadius; - } + // End + @ConfigEntry(path = "world.end.generate") + private boolean endGenerate = true; + @ConfigEntry(path = "world.end.caves", needsReset = true) + private boolean endIslands = true; - /** - * This method returns the endGenerate object. - * @return the endGenerate object. - */ - @Override - public boolean isEndGenerate() - { - return endGenerate; - } + @ConfigComment("The default biome for the end world (this may affect what mobs can spawn)") + @ConfigEntry(path = "world.end.biome", since = "1.14.0") + private Biome defaultTheEndBiome = Enums.getIfPresent(Biome.class, "THE_END").or(Biome.THE_VOID); + @ConfigEntry(path = "world.end.dragon-spawn", experimental = true) + private boolean dragonSpawn = false; - /** - * This method returns the endIslands object. - * @return the endIslands object. - */ - @Override - public boolean isEndIslands() - { - return endIslands; - } + @ConfigComment("Make over world roof of bedrock, if false, it will be made from stone") + @ConfigEntry(path = "world.end.roof", needsReset = true) + private boolean endRoof = true; + @ConfigComment("Make over world floor of bedrock, if false, it will be made from stone") + @ConfigEntry(path = "world.end.floor", needsReset = true) + private boolean endFloor = true; - /** - * This method returns the dragonSpawn object. - * @return the dragonSpawn object. - */ - @Override - public boolean isDragonSpawn() - { - return dragonSpawn; - } + @ConfigComment("Main block of which world will be generated.") + @ConfigEntry(path = "world.end.main-block", needsReset = true) + private Material endMainBlock = Material.END_STONE; + @ConfigComment("Blocks that will occasionally replace main block by random chance.") + @ConfigComment("Blocks will replace only main-block and will try to create packs that") + @ConfigComment("are set in their strings. Chance of spawning also is required.") + @ConfigComment("For materials first string must be MATERIAL, for entity: ENTITY.") + @ConfigComment("Entities spawned via generator are not protected from despawing.") + @ConfigComment("Working only with 2 high mobs currently.") + @ConfigComment("Example:") + @ConfigComment("MATERIAL:DIAMOND_ORE:100:5 - means there is 100% chace of spawing diamonds") + @ConfigComment("where max amount in pack are 5 per each subchunk!") + @ConfigEntry(path = "world.end.blocks", needsReset = true) + private List endBlocks = new ArrayList<>(); - /** - * This method returns the removeMobsWhitelist object. - * @return the removeMobsWhitelist object. - */ - @Override - public Set getRemoveMobsWhitelist() - { - return removeMobsWhitelist; - } + @ConfigComment("This option indicates if obsidian platform in the end should be generated") + @ConfigComment("when player enters the end world.") + @ConfigEntry(path = "world.end.create-obsidian-platform") + private boolean makeEndPortals = false; + // Other staff. - /** - * This method returns the worldFlags object. - * @return the worldFlags object. - */ - @Override - public Map getWorldFlags() - { - return worldFlags; - } + @ConfigComment("Mob white list - these mobs will NOT be removed when logging in or doing /cave") + @ConfigEntry(path = "world.remove-mobs-whitelist") + private Set removeMobsWhitelist = new HashSet<>(); + @ConfigComment("World flags. These are boolean settings for various flags for this world") + @ConfigEntry(path = "world.flags") + private Map worldFlags = new HashMap<>(); - /** - * This method returns the defaultIslandFlags object. - * @return the defaultIslandFlags object. - */ - @Override - public Map getDefaultIslandFlagNames() - { - return defaultIslandFlags; - } + @ConfigComment("These are the default protection settings for new caves.") + @ConfigComment("The value is the minimum cave rank required allowed to do the action.") + @ConfigComment("Ranks are the following:") + @ConfigComment(" VISITOR = 0") + @ConfigComment(" COOP = 200") + @ConfigComment(" TRUSTED = 400") + @ConfigComment(" MEMBER = 500") + @ConfigComment(" SUB-OWNER = 900") + @ConfigComment(" OWNER = 1000") + @ConfigEntry(path = "world.default-cave-flags") + private Map defaultIslandFlags = new HashMap<>(); + @ConfigComment("These are the default settings for new caves") + @ConfigEntry(path = "world.default-cave-settings") + private Map defaultIslandSettings = new HashMap<>(); - /** - * This method returns the defaultIslandSettings object. - * @return the defaultIslandSettings object. - */ - @Override - public Map getDefaultIslandSettingNames() - { - return defaultIslandSettings; - } + @ConfigComment("These settings/flags are hidden from users") + @ConfigComment("Ops can toggle hiding in-game using SHIFT-LEFT-CLICK on flags in settings") + @ConfigEntry(path = "world.hidden-flags") + private List hiddenFlags = new ArrayList<>(); + @ConfigComment("Visitor banned commands - Visitors to caves cannot use these commands in this world") + @ConfigEntry(path = "world.visitor-banned-commands") + private List visitorBannedCommands = new ArrayList<>(); - /** - * This method returns the hiddenFlags object. - * @return the hiddenFlags object. - */ - @Override - public List getHiddenFlags() - { - return hiddenFlags; - } - - - /** - * This method returns the visitorBannedCommands object. - * @return the visitorBannedCommands object. - */ - @Override - public List getVisitorBannedCommands() - { - return visitorBannedCommands; - } - - - /** - * Optional list of commands that are banned when falling. Not applicable to all - * game modes so defaults to empty. - * @return the fallingBannedCommands - * @since 1.8.0 - */ - @Override - public List getFallingBannedCommands() - { - return this.fallingBannedCommands; - } - - - /** - * This method returns the maxTeamSize object. - * @return the maxTeamSize object. - */ - @Override - public int getMaxTeamSize() - { - return maxTeamSize; - } - + @ConfigComment("Falling banned commands - players cannot use these commands when falling") + @ConfigComment("if the PREVENT_TELEPORT_WHEN_FALLING world setting flag is active") + @ConfigEntry(path = "world.falling-banned-commands") + private List fallingBannedCommands = new ArrayList<>(); - /** - * This method returns the maxHomes object. - * @return the maxHomes object. - */ - @Override - public int getMaxHomes() - { - return maxHomes; - } + // --------------------------------------------- + /* Cave */ + @ConfigComment("Default max team size") + @ConfigComment("Permission size cannot be less than the default below. ") + @ConfigEntry(path = "cave.max-team-size") + private int maxTeamSize = 4; - /** - * This method returns the resetLimit object. - * @return the resetLimit object. - */ - @Override - public int getResetLimit() - { - return resetLimit; - } + @ConfigComment("Default maximum number of coop rank members per cave") + @ConfigComment("Players can have the caveblock.coop.maxsize. permission to be bigger but") + @ConfigComment("permission size cannot be less than the default below. ") + @ConfigEntry(path = "cave.max-coop-size", since = "1.13.0") + private int maxCoopSize = 4; + @ConfigComment("Default maximum number of trusted rank members per cave") + @ConfigComment("Players can have the caveblock.trust.maxsize. permission to be bigger but") + @ConfigComment("permission size cannot be less than the default below. ") + @ConfigEntry(path = "cave.max-trusted-size", since = "1.13.0") + private int maxTrustSize = 4; - /** - * This method returns the leaversLoseReset object. - * @return the leaversLoseReset object. - */ - @Override - public boolean isLeaversLoseReset() - { - return leaversLoseReset; - } + @ConfigComment("Default maximum number of homes a player can have. Min = 1") + @ConfigComment("Accessed via /cave sethome or /cave go ") + @ConfigEntry(path = "cave.max-homes") + private int maxHomes = 5; + // Reset + @ConfigComment("How many resets a player is allowed (override with /cbadmin clearresets )") + @ConfigComment("Value of -1 means unlimited, 0 means hardcore - no resets.") + @ConfigComment("Example, 2 resets means they get 2 resets or 3 caves lifetime") + @ConfigEntry(path = "cave.reset.reset-limit") + private int resetLimit = -1; - /** - * This method returns the kickedKeepInventory object. - * @return the kickedKeepInventory value. - */ - @Override - public boolean isKickedKeepInventory() - { - return kickedKeepInventory; - } + @ConfigComment("Kicked or leaving players lose resets") + @ConfigComment("Players who leave a team will lose a cave reset chance") + @ConfigComment("If a player has zero resets left and leaves a team, they cannot make a new") + @ConfigComment("cave by themselves and can only join a team.") + @ConfigComment("Leave this true to avoid players exploiting free caves") + @ConfigEntry(path = "cave.reset.leavers-lose-reset") + private boolean leaversLoseReset = false; + @ConfigComment("Allow kicked players to keep their inventory.") + @ConfigComment("Overrides the on-leave inventory reset for kicked players.") + @ConfigEntry(path = "cave.reset.kicked-keep-inventory") + private boolean kickedKeepInventory = false; - /** - * This method returns the createIslandOnFirstLoginEnabled boolean value. - * @return the createIslandOnFirstLoginEnabled value - * @since 1.9.0 - */ - @Override - public boolean isCreateIslandOnFirstLoginEnabled() - { - return this.createIslandOnFirstLoginEnabled; - } + @ConfigComment("What the plugin should reset when the player joins or creates a cave") + @ConfigComment("Reset Money - if this is true, will reset the player's money to the starting money") + @ConfigComment("Recommendation is that this is set to true, but if you run multi-worlds") + @ConfigComment("make sure your economy handles multi-worlds too.") + @ConfigEntry(path = "cave.reset.on-join.money") + private boolean onJoinResetMoney = false; + @ConfigComment("Reset inventory - if true, the player's inventory will be cleared.") + @ConfigComment("Note: if you have MultiInv running or a similar inventory control plugin, that") + @ConfigComment("plugin may still reset the inventory when the world changes.") + @ConfigEntry(path = "cave.reset.on-join.inventory") + private boolean onJoinResetInventory = false; - /** - * This method returns the createIslandOnFirstLoginDelay integer value. - * @return the createIslandOnFirstLoginDelay value - * @since 1.9.0 - */ - @Override - public int getCreateIslandOnFirstLoginDelay() - { - return this.createIslandOnFirstLoginDelay; - } + @ConfigComment("Reset health - if true, the player's health will be reset.") + @ConfigEntry(path = "cave.reset.on-join.health") + private boolean onJoinResetHealth = true; + @ConfigComment("Reset hunger - if true, the player's hunger will be reset.") + @ConfigEntry(path = "cave.reset.on-join.hunger") + private boolean onJoinResetHunger = true; - /** - * This method returns the createIslandOnFirstLoginAbortOnLogout boolean value. - * @return the createIslandOnFirstLoginAbortOnLogout value - * @since 1.9.0 - */ - @Override - public boolean isCreateIslandOnFirstLoginAbortOnLogout() - { - return this.createIslandOnFirstLoginAbortOnLogout; - } + @ConfigComment("Reset experience points - if true, the player's experience will be reset.") + @ConfigEntry(path = "cave.reset.on-join.exp") + private boolean onJoinResetXP = false; + @ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.") + @ConfigEntry(path = "cave.reset.on-join.ender-chest") + private boolean onJoinResetEnderChest = false; - /** - * This method returns the onJoinResetMoney object. - * @return the onJoinResetMoney object. - */ - @Override - public boolean isOnJoinResetMoney() - { - return onJoinResetMoney; - } + @ConfigComment("What the plugin should reset when the player leaves or is kicked from a cave") + @ConfigComment("Reset Money - if this is true, will reset the player's money to the starting money") + @ConfigComment("Recommendation is that this is set to true, but if you run multi-worlds") + @ConfigComment("make sure your economy handles multi-worlds too.") + @ConfigEntry(path = "cave.reset.on-leave.money") + private boolean onLeaveResetMoney = false; + @ConfigComment("Reset inventory - if true, the player's inventory will be cleared.") + @ConfigComment("Note: if you have MultiInv running or a similar inventory control plugin, that") + @ConfigComment("plugin may still reset the inventory when the world changes.") + @ConfigEntry(path = "cave.reset.on-leave.inventory") + private boolean onLeaveResetInventory = false; - /** - * This method returns the onJoinResetInventory object. - * @return the onJoinResetInventory object. - */ - @Override - public boolean isOnJoinResetInventory() - { - return onJoinResetInventory; - } + @ConfigComment("Reset health - if true, the player's health will be reset.") + @ConfigEntry(path = "cave.reset.on-leave.health") + private boolean onLeaveResetHealth = false; + @ConfigComment("Reset hunger - if true, the player's hunger will be reset.") + @ConfigEntry(path = "cave.reset.on-leave.hunger") + private boolean onLeaveResetHunger = false; - /** - * This method returns the onJoinResetEnderChest object. - * @return the onJoinResetEnderChest object. - */ - @Override - public boolean isOnJoinResetEnderChest() - { - return onJoinResetEnderChest; - } + @ConfigComment("Reset experience - if true, the player's experience will be reset.") + @ConfigEntry(path = "cave.reset.on-leave.exp") + private boolean onLeaveResetXP = false; + @ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.") + @ConfigEntry(path = "cave.reset.on-leave.ender-chest") + private boolean onLeaveResetEnderChest = false; - /** - * This method returns the onLeaveResetMoney object. - * @return the onLeaveResetMoney object. - */ - @Override - public boolean isOnLeaveResetMoney() - { - return onLeaveResetMoney; - } + @ConfigComment("Toggles the automatic cave creation upon the player's first login on your server.") + @ConfigComment("If set to true,") + @ConfigComment(" * Upon connecting to your server for the first time, the player will be told that") + @ConfigComment(" a cave will be created for him.") + @ConfigComment(" * Make sure you have a Blueprint Bundle called \"default\": this is the one that will") + @ConfigComment(" be used to create the cave.") + @ConfigComment(" * A cave will be created for the player without needing him to run the create command.") + @ConfigComment("If set to false, this will disable this feature entirely.") + @ConfigComment("Warning:") + @ConfigComment(" * If you are running multiple gamemodes on your server, and all of them have") + @ConfigComment(" this feature enabled, a cave in all the gamemodes will be created simultaneously.") + @ConfigComment(" However, it is impossible to know on which cave the player will be teleported to afterwards.") + @ConfigComment(" * Cave creation can be resource-intensive, please consider the options below to help mitigate") + @ConfigComment(" the potential issues, especially if you expect a lot of players to connect to your server") + @ConfigComment(" in a limited period of time.") + @ConfigEntry(path = "cave.create-cave-on-first-login.enable") + private boolean createIslandOnFirstLoginEnabled; + @ConfigComment("Time in seconds after the player logged in, before his cave gets created.") + @ConfigComment("If set to 0 or less, the cave will be created directly upon the player's login.") + @ConfigComment("It is recommended to keep this value under a minute's time.") + @ConfigEntry(path = "cave.create-cave-on-first-login.delay") + private int createIslandOnFirstLoginDelay = 5; - /** - * This method returns the onLeaveResetInventory object. - * @return the onLeaveResetInventory object. - */ - @Override - public boolean isOnLeaveResetInventory() - { - return onLeaveResetInventory; - } + @ConfigComment("Toggles whether the cave creation should be aborted if the player logged off while the") + @ConfigComment("delay (see the option above) has not worn off yet.") + @ConfigComment("If set to true,") + @ConfigComment(" * If the player has logged off the server while the delay (see the option above) has not") + @ConfigComment(" worn off yet, this will cancel the cave creation.") + @ConfigComment(" * If the player relogs afterward, since he will not be recognized as a new player, no cave") + @ConfigComment(" would be created for him.") + @ConfigComment(" * If the cave creation started before the player logged off, it will continue.") + @ConfigComment("If set to false, the player's cave will be created even if he went offline in the meantime.") + @ConfigComment("Note this option has no effect if the delay (see the option above) is set to 0 or less.") + @ConfigEntry(path = "cave.create-cave-on-first-login.abort-on-logout") + private boolean createIslandOnFirstLoginAbortOnLogout = true; + @ConfigComment("Toggles whether the player should be teleported automatically to his cave when it is created.") + @ConfigComment("If set to false, the player will be told his cave is ready but will have to teleport to his cave using the command.") + @ConfigEntry(path = "cave.teleport-player-to-cave-when-created", since = "1.10.0") + private boolean teleportPlayerToIslandUponIslandCreation = true; - /** - * This method returns the onLeaveResetEnderChest object. - * @return the onLeaveResetEnderChest object. - */ - @Override - public boolean isOnLeaveResetEnderChest() - { - return onLeaveResetEnderChest; - } + @ConfigComment("Create Nether or End cave if they are missing when a player goes through a portal.") + @ConfigComment("Nether and End cave are usually pasted when a player makes their cave, but if they are") + @ConfigComment("missing for some reason, you can switch this on.") + @ConfigComment("Note that bedrock removal glitches can exploit this option.") + @ConfigEntry(path = "cave.create-missing-nether-end-caves", since = "1.10.0") + private boolean pasteMissingIslands = false; + // Commands + @ConfigComment("List of commands to run when a player joins an cave or creates one.") + @ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,") + @ConfigComment("in which case they are executed by the player.") + @ConfigComment("") + @ConfigComment("Available placeholders for the commands are the following:") + @ConfigComment(" * [name]: name of the player") + @ConfigComment("") + @ConfigComment("Here are some examples of valid commands to execute:") + @ConfigComment(" * '[SUDO] bbox version'") + @ConfigComment(" * 'bsbadmin deaths set [player] 0'") + @ConfigComment("") + @ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.") + @ConfigEntry(path = "cave.commands.on-join", since = "1.8.0") + private List onJoinCommands = new ArrayList<>(); - /** - * This method returns the allowSetHomeInNether object. - * @return the allowSetHomeInNether object. - */ - @Override - public boolean isAllowSetHomeInNether() - { - return allowSetHomeInNether; - } + @ConfigComment("List of commands to run when a player leaves a cave, resets his cave or gets kicked from it.") + @ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,") + @ConfigComment("in which case they are executed by the player.") + @ConfigComment("") + @ConfigComment("Available placeholders for the commands are the following:") + @ConfigComment(" * [name]: name of the player") + @ConfigComment("") + @ConfigComment("Here are some examples of valid commands to execute:") + @ConfigComment(" * '[SUDO] bbox version'") + @ConfigComment(" * 'bsbadmin deaths set [player] 0'") + @ConfigComment("") + @ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.") + @ConfigEntry(path = "cave.commands.on-leave", since = "1.8.0") + private List onLeaveCommands = new ArrayList<>(); + @ConfigComment("List of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true.") + @ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,") + @ConfigComment("in which case they are executed by the player.") + @ConfigComment("") + @ConfigComment("Available placeholders for the commands are the following:") + @ConfigComment(" * [name]: name of the player") + @ConfigComment("") + @ConfigComment("Here are some examples of valid commands to execute:") + @ConfigComment(" * '[SUDO] bbox version'") + @ConfigComment(" * 'bsbadmin deaths set [player] 0'") + @ConfigComment("") + @ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.") + @ConfigEntry(path = "cave.commands.on-respawn", since = "1.14.0") + private List onRespawnCommands = new ArrayList<>(); - /** - * This method returns the requireConfirmationToSetHomeInNether object. - * @return the requireConfirmationToSetHomeInNether object. - */ - @Override - public boolean isRequireConfirmationToSetHomeInNether() - { - return requireConfirmationToSetHomeInNether; - } + // Sethome + @ConfigComment("Allow setting home in the nether. Only available on nether islands, not vanilla nether.") + @ConfigEntry(path = "cave.sethome.nether.allow") + private boolean allowSetHomeInNether = true; + @ConfigEntry(path = "cave.sethome.nether.require-confirmation") + private boolean requireConfirmationToSetHomeInNether = true; - /** - * This method returns the allowSetHomeInTheEnd object. - * @return the allowSetHomeInTheEnd object. - */ - @Override - public boolean isAllowSetHomeInTheEnd() - { - return allowSetHomeInTheEnd; - } + @ConfigComment("Allow setting home in the end. Only available on end islands, not vanilla end.") + @ConfigEntry(path = "cave.sethome.the-end.allow") + private boolean allowSetHomeInTheEnd = true; + @ConfigEntry(path = "cave.sethome.the-end.require-confirmation") + private boolean requireConfirmationToSetHomeInTheEnd = true; - /** - * This method returns the requireConfirmationToSetHomeInTheEnd object. - * @return the requireConfirmationToSetHomeInTheEnd object. - */ - @Override - public boolean isRequireConfirmationToSetHomeInTheEnd() - { - return requireConfirmationToSetHomeInTheEnd; - } + // Deaths + @ConfigComment("Whether deaths are counted or not.") + @ConfigEntry(path = "cave.deaths.counted") + private boolean deathsCounted = true; + @ConfigComment("Maximum number of deaths to count. The death count can be used by add-ons.") + @ConfigEntry(path = "cave.deaths.max") + private int deathsMax = 10; - /** - * This method returns the deathsCounted object. - * @return the deathsCounted object. - */ - @Override - public boolean isDeathsCounted() - { - return deathsCounted; - } + @ConfigComment("Reset player death count when they start a new cave or reset a cave") + @ConfigEntry(path = "cave.deaths.reset-on-new") + private boolean deathsResetOnNewIsland = true; + @ConfigComment("When a player joins a team, reset their death count") + @ConfigEntry(path = "cave.deaths.team-join-reset") + private boolean teamJoinDeathReset = true; - /** - * @return true if deaths in the world are reset when the player has a new cave - * @since 1.6.0 - */ - @Override - public boolean isDeathsResetOnNewIsland() - { - return this.deathsResetOnNewIsland; - } + // --------------------------------------------- + /* PROTECTION */ + @ConfigComment("Geo restrict mobs.") + @ConfigComment("Mobs that exit the cave space where they were spawned will be removed.") + @ConfigEntry(path = "protection.geo-limit-settings") + private List geoLimitSettings = new ArrayList<>(); - /** - * This method returns the deathsMax object. - * @return the deathsMax object. - */ - @Override - public int getDeathsMax() - { - return deathsMax; - } + @ConfigComment("CaveBlock blocked mobs.") + @ConfigComment("List of mobs that should not spawn in the CaveBlock.") + @ConfigEntry(path = "protection.block-mobs", since = "1.13.0") + private List mobLimitSettings = new ArrayList<>(); + // Invincible visitor settings + @ConfigComment("Invincible visitors. List of damages that will not affect visitors.") + @ConfigComment("Make list blank if visitors should receive all damages") + @ConfigEntry(path = "protection.invincible-visitors") + private List ivSettings = new ArrayList<>(); - /** - * This method returns the teamJoinDeathReset object. - * @return the teamJoinDeathReset object. - */ - @Override - public boolean isTeamJoinDeathReset() - { - return teamJoinDeathReset; - } + //---------------------------------------------------------------------------------------/ + @ConfigComment("These settings should not be edited") + @ConfigEntry(path = "do-not-edit-these-settings.reset-epoch") + private long resetEpoch = 0; + private boolean debug; + // --------------------------------------------------------------------- + // Section: Getters + // --------------------------------------------------------------------- /** - * This method returns the geoLimitSettings object. - * @return the geoLimitSettings object. + * @return the maxCoopSize */ @Override - public List getGeoLimitSettings() - { - return geoLimitSettings; + public int getMaxCoopSize() { + return maxCoopSize; } - /** - * This method returns the ivSettings object. - * @return the ivSettings object. + * @return the maxTrustSize */ @Override - public List getIvSettings() - { - return ivSettings; + public int getMaxTrustSize() { + return maxTrustSize; } - /** - * @return the permission prefix + * This method returns the friendlyName object. + * @return the friendlyName object. */ @Override - public String getPermissionPrefix() + public String getFriendlyName() { - return "caveblock"; + return friendlyName; } /** - * @return true if water is not safe in this world, e.g, should not be a home location + * This method returns the worldName object. + * @return the worldName object. */ @Override - public boolean isWaterUnsafe() + public String getWorldName() { - return false; + return worldName; } /** - * This method returns the resetEpoch object. - * @return the resetEpoch object. + * This method returns the difficulty object. + * @return the difficulty object. */ @Override - public long getResetEpoch() + public Difficulty getDifficulty() { - return resetEpoch; + return difficulty; } /** - * This method returns the worldDepth value. - * @return the value of worldDepth. + * This method returns the islandDistance object. + * @return the islandDistance object. */ - public int getWorldDepth() + @Override + public int getIslandDistance() { - return worldDepth; + return islandDistance; } /** - * This method returns the normalRoof value. - * @return the value of normalRoof. + * This method returns the islandProtectionRange object. + * @return the islandProtectionRange object. */ - public boolean isNormalRoof() + @Override + public int getIslandProtectionRange() { - return normalRoof; + return islandProtectionRange; } /** - * This method returns the normalFloor value. - * @return the value of normalFloor. + * This method returns the islandStartX object. + * @return the islandStartX object. */ - public boolean isNormalFloor() + @Override + public int getIslandStartX() { - return normalFloor; + return islandStartX; } /** - * This method returns the normalMainBlock value. - * @return the value of normalMainBlock. + * This method returns the islandStartZ object. + * @return the islandStartZ object. */ - public Material getNormalMainBlock() + @Override + public int getIslandStartZ() { - return normalMainBlock; + return islandStartZ; } /** - * This method returns the normalBlocks value. - * @return the value of normalBlocks. + * This method returns the islandXOffset object. + * @return the islandXOffset object. */ - public List getNormalBlocks() + @Override + public int getIslandXOffset() { - return normalBlocks; + return islandXOffset; } /** - * This method returns the netherFloor value. - * @return the value of netherFloor. + * This method returns the islandZOffset object. + * @return the islandZOffset object. */ - public boolean isNetherFloor() + @Override + public int getIslandZOffset() { - return netherFloor; + return islandZOffset; } /** - * This method returns the netherMainBlock value. - * @return the value of netherMainBlock. + * This method returns the islandHeight object. + * @return the islandHeight object. */ - public Material getNetherMainBlock() + @Override + public int getIslandHeight() { - return netherMainBlock; + return islandHeight; } /** - * This method returns the netherBlocks value. - * @return the value of netherBlocks. + * This is not an option in Caveblock + * @return false */ - public List getNetherBlocks() + @Override + public boolean isUseOwnGenerator() { - return netherBlocks; + return false; } /** - * This method returns the endRoof value. - * @return the value of endRoof. + * This method returns the seaHeight object. + * @return the seaHeight object. */ - public boolean isEndRoof() + @Override + public int getSeaHeight() { - return endRoof; + return 0; } /** - * This method returns the endFloor value. - * @return the value of endFloor. + * 0 or -1 is unlimited. It will block cave creation if the cave count for the world is higher than this. + * @return the maxIslands */ - public boolean isEndFloor() + @Override + public int getMaxIslands() { - return endFloor; + return maxIslands; } /** - * This method returns the endMainBlock value. - * @return the value of endMainBlock. + * This method returns the defaultGameMode object. + * @return the defaultGameMode object. */ - public Material getEndMainBlock() + @Override + public GameMode getDefaultGameMode() { - return endMainBlock; + return defaultGameMode; } /** - * This method returns the endBlocks value. - * @return the value of endBlocks. + * This method returns the defaultBiome object. + * @return the defaultBiome object. */ - public List getEndBlocks() + public Biome getDefaultBiome() { - return endBlocks; + return defaultBiome; } /** - * This method returns the numberOfBlockGenerationTries value. - * @return the value of numberOfBlockGenerationTries. - */ - public int getNumberOfBlockGenerationTries() - { - return numberOfBlockGenerationTries; - } - - /** - * This method returns the newMaterialGenerator value. - * @return the value of newMaterialGenerator. + * This method returns the banLimit object. + * @return the banLimit object. */ - public boolean isNewMaterialGenerator() + @Override + public int getBanLimit() { - return newMaterialGenerator; + return banLimit; } /** - * {@inheritDoc} + * This method returns the netherGenerate object. + * @return the netherGenerate object. */ @Override - public List getMobLimitSettings() + public boolean isNetherGenerate() { - return mobLimitSettings; + return netherGenerate; } /** - * {@inheritDoc} + * This method returns the netherIslands object. + * @return the netherIslands object. */ @Override - public String getPlayerCommandAliases() + public boolean isNetherIslands() { - return playerCommandAliases; + return netherIslands; } /** - * {@inheritDoc} + * This method returns the netherRoof object. + * @return the netherRoof object. */ - @Override - public String getAdminCommandAliases() + public boolean isNetherRoof() { - return adminCommandAliases; + return netherRoof; } /** - * {@inheritDoc} + * This method returns the netherSpawnRadius object. + * @return the netherSpawnRadius object. */ @Override - public String getDefaultPlayerAction() + public int getNetherSpawnRadius() { - return defaultPlayerAction; + return netherSpawnRadius; } /** - * {@inheritDoc} + * This method returns the endGenerate object. + * @return the endGenerate object. */ @Override - public String getDefaultNewPlayerAction() + public boolean isEndGenerate() { - return defaultNewPlayerAction; + return endGenerate; } /** - * {@inheritDoc} + * This method returns the endIslands object. + * @return the endIslands object. */ @Override - public boolean isMakeNetherPortals() + public boolean isEndIslands() { - return this.makeNetherPortals; + return endIslands; } /** - * {@inheritDoc} + * This method returns the dragonSpawn object. + * @return the dragonSpawn object. */ @Override - public boolean isMakeEndPortals() + public boolean isDragonSpawn() { - return this.makeEndPortals; + return dragonSpawn; } /** - * {@inheritDoc} + * This method returns the removeMobsWhitelist object. + * @return the removeMobsWhitelist object. */ @Override - public @NonNull List getOnRespawnCommands() + public Set getRemoveMobsWhitelist() { - return this.onRespawnCommands; + return removeMobsWhitelist; } - // --------------------------------------------------------------------- - // Section: Setters - // --------------------------------------------------------------------- - - /** - * @param maxCoopSize the maxCoopSize to set - */ - public void setMaxCoopSize(int maxCoopSize) { - this.maxCoopSize = maxCoopSize; - } - /** - * @param maxTrustSize the maxTrustSize to set + * This method returns the worldFlags object. + * @return the worldFlags object. */ - public void setMaxTrustSize(int maxTrustSize) { - this.maxTrustSize = maxTrustSize; + @Override + public Map getWorldFlags() + { + return worldFlags; } + /** - * This method sets the friendlyName object value. - * @param friendlyName the friendlyName object new value. - * + * This method returns the defaultIslandFlags object. + * @return the defaultIslandFlags object. */ - public void setFriendlyName(String friendlyName) + @Override + public Map getDefaultIslandFlagNames() { - this.friendlyName = friendlyName; + return defaultIslandFlags; } /** - * This method sets the worldName object value. - * @param worldName the worldName object new value. - * + * This method returns the defaultIslandSettings object. + * @return the defaultIslandSettings object. */ - public void setWorldName(String worldName) + @Override + public Map getDefaultIslandSettingNames() { - this.worldName = worldName; + return defaultIslandSettings; } /** - * This method sets the difficulty object value. - * @param difficulty the difficulty object new value. - * + * This method returns the hiddenFlags object. + * @return the hiddenFlags object. */ @Override - public void setDifficulty(Difficulty difficulty) + public List getHiddenFlags() { - this.difficulty = difficulty; + return hiddenFlags; } /** - * This method sets the islandDistance object value. - * @param islandDistance the islandDistance object new value. - * + * This method returns the visitorBannedCommands object. + * @return the visitorBannedCommands object. */ - public void setIslandDistance(int islandDistance) + @Override + public List getVisitorBannedCommands() { - this.islandDistance = islandDistance; + return visitorBannedCommands; } /** - * This method sets the islandProtectionRange object value. - * @param islandProtectionRange the islandProtectionRange object new value. - * + * Optional list of commands that are banned when falling. Not applicable to all + * game modes so defaults to empty. + * @return the fallingBannedCommands + * @since 1.8.0 */ - public void setIslandProtectionRange(int islandProtectionRange) + @Override + public List getFallingBannedCommands() { - this.islandProtectionRange = islandProtectionRange; + return this.fallingBannedCommands; } /** - * This method sets the islandStartX object value. - * @param islandStartX the islandStartX object new value. - * + * This method returns the maxTeamSize object. + * @return the maxTeamSize object. */ - public void setIslandStartX(int islandStartX) + @Override + public int getMaxTeamSize() { - this.islandStartX = islandStartX; + return maxTeamSize; } /** - * This method sets the islandStartZ object value. - * @param islandStartZ the islandStartZ object new value. - * + * This method returns the maxHomes object. + * @return the maxHomes object. */ - public void setIslandStartZ(int islandStartZ) + @Override + public int getMaxHomes() { - this.islandStartZ = islandStartZ; + return maxHomes; } /** - * This method sets the islandXOffset object value. - * @param islandXOffset the islandXOffset object new value. - * + * This method returns the resetLimit object. + * @return the resetLimit object. */ - public void setIslandXOffset(int islandXOffset) + @Override + public int getResetLimit() { - this.islandXOffset = islandXOffset; + return resetLimit; } /** - * This method sets the islandZOffset object value. - * @param islandZOffset the islandZOffset object new value. - * + * This method returns the leaversLoseReset object. + * @return the leaversLoseReset object. */ - public void setIslandZOffset(int islandZOffset) + @Override + public boolean isLeaversLoseReset() { - this.islandZOffset = islandZOffset; + return leaversLoseReset; } /** - * This method sets the islandHeight object value. - * @param islandHeight the islandHeight object new value. - * + * This method returns the kickedKeepInventory object. + * @return the kickedKeepInventory value. */ - public void setIslandHeight(int islandHeight) + @Override + public boolean isKickedKeepInventory() { - this.islandHeight = islandHeight; + return kickedKeepInventory; } /** - * This method sets the maxIslands object value. - * @param maxIslands the maxIslands object new value. - * + * This method returns the createIslandOnFirstLoginEnabled boolean value. + * @return the createIslandOnFirstLoginEnabled value + * @since 1.9.0 */ - public void setMaxIslands(int maxIslands) + @Override + public boolean isCreateIslandOnFirstLoginEnabled() { - this.maxIslands = maxIslands; + return this.createIslandOnFirstLoginEnabled; } /** - * This method sets the defaultGameMode object value. - * @param defaultGameMode the defaultGameMode object new value. - * + * This method returns the createIslandOnFirstLoginDelay integer value. + * @return the createIslandOnFirstLoginDelay value + * @since 1.9.0 */ - public void setDefaultGameMode(GameMode defaultGameMode) + @Override + public int getCreateIslandOnFirstLoginDelay() { - this.defaultGameMode = defaultGameMode; + return this.createIslandOnFirstLoginDelay; } /** - * This method sets the defaultBiome object value. - * @param defaultBiome the defaultBiome object new value. - * + * This method returns the createIslandOnFirstLoginAbortOnLogout boolean value. + * @return the createIslandOnFirstLoginAbortOnLogout value + * @since 1.9.0 */ - public void setDefaultBiome(Biome defaultBiome) + @Override + public boolean isCreateIslandOnFirstLoginAbortOnLogout() { - this.defaultBiome = defaultBiome; + return this.createIslandOnFirstLoginAbortOnLogout; } /** - * This method sets the banLimit object value. - * @param banLimit the banLimit object new value. - * + * This method returns the onJoinResetMoney object. + * @return the onJoinResetMoney object. */ - public void setBanLimit(int banLimit) + @Override + public boolean isOnJoinResetMoney() { - this.banLimit = banLimit; + return onJoinResetMoney; } /** - * This method sets the netherGenerate object value. - * @param netherGenerate the netherGenerate object new value. - * + * This method returns the onJoinResetInventory object. + * @return the onJoinResetInventory object. */ - public void setNetherGenerate(boolean netherGenerate) + @Override + public boolean isOnJoinResetInventory() { - this.netherGenerate = netherGenerate; + return onJoinResetInventory; } /** - * This method sets the netherIslands object value. - * @param netherIslands the netherIslands object new value. - * + * This method returns the onJoinResetEnderChest object. + * @return the onJoinResetEnderChest object. */ - public void setNetherIslands(boolean netherIslands) + @Override + public boolean isOnJoinResetEnderChest() { - this.netherIslands = netherIslands; + return onJoinResetEnderChest; } /** - * This method sets the netherRoof object value. - * @param netherRoof the netherRoof object new value. - * + * This method returns the onLeaveResetMoney object. + * @return the onLeaveResetMoney object. */ - public void setNetherRoof(boolean netherRoof) + @Override + public boolean isOnLeaveResetMoney() { - this.netherRoof = netherRoof; + return onLeaveResetMoney; } /** - * This method sets the netherSpawnRadius object value. - * @param netherSpawnRadius the netherSpawnRadius object new value. - * + * This method returns the onLeaveResetInventory object. + * @return the onLeaveResetInventory object. */ - public void setNetherSpawnRadius(int netherSpawnRadius) + @Override + public boolean isOnLeaveResetInventory() { - this.netherSpawnRadius = netherSpawnRadius; + return onLeaveResetInventory; } /** - * This method sets the endGenerate object value. - * @param endGenerate the endGenerate object new value. - * + * This method returns the onLeaveResetEnderChest object. + * @return the onLeaveResetEnderChest object. */ - public void setEndGenerate(boolean endGenerate) + @Override + public boolean isOnLeaveResetEnderChest() { - this.endGenerate = endGenerate; + return onLeaveResetEnderChest; } /** - * This method sets the endIslands object value. - * @param endIslands the endIslands object new value. - * + * This method returns the allowSetHomeInNether object. + * @return the allowSetHomeInNether object. */ - public void setEndIslands(boolean endIslands) + @Override + public boolean isAllowSetHomeInNether() { - this.endIslands = endIslands; + return allowSetHomeInNether; } /** - * This method sets the dragonSpawn object value. - * @param dragonSpawn the dragonSpawn object new value. - * + * This method returns the requireConfirmationToSetHomeInNether object. + * @return the requireConfirmationToSetHomeInNether object. */ - public void setDragonSpawn(boolean dragonSpawn) + @Override + public boolean isRequireConfirmationToSetHomeInNether() { - this.dragonSpawn = dragonSpawn; + return requireConfirmationToSetHomeInNether; } /** - * This method sets the removeMobsWhitelist object value. - * @param removeMobsWhitelist the removeMobsWhitelist object new value. - * + * This method returns the allowSetHomeInTheEnd object. + * @return the allowSetHomeInTheEnd object. */ - public void setRemoveMobsWhitelist(Set removeMobsWhitelist) + @Override + public boolean isAllowSetHomeInTheEnd() { - this.removeMobsWhitelist = removeMobsWhitelist; + return allowSetHomeInTheEnd; } /** - * This method sets the worldFlags object value. - * @param worldFlags the worldFlags object new value. - * + * This method returns the requireConfirmationToSetHomeInTheEnd object. + * @return the requireConfirmationToSetHomeInTheEnd object. */ - public void setWorldFlags(Map worldFlags) + @Override + public boolean isRequireConfirmationToSetHomeInTheEnd() { - this.worldFlags = worldFlags; + return requireConfirmationToSetHomeInTheEnd; } /** - * This method sets the defaultIslandFlags object value. - * @param defaultIslandFlags the defaultIslandFlags object new value. - * + * This method returns the deathsCounted object. + * @return the deathsCounted object. */ - public void setDefaultIslandFlags(Map defaultIslandFlags) + @Override + public boolean isDeathsCounted() { - this.defaultIslandFlags = defaultIslandFlags; + return deathsCounted; } /** - * This method sets the defaultIslandSettings object value. - * @param defaultIslandSettings the defaultIslandSettings object new value. - * + * @return true if deaths in the world are reset when the player has a new cave + * @since 1.6.0 */ - public void setDefaultIslandSettings(Map defaultIslandSettings) + @Override + public boolean isDeathsResetOnNewIsland() { - this.defaultIslandSettings = defaultIslandSettings; + return this.deathsResetOnNewIsland; } /** - * This method sets the hiddenFlags object value. - * @param hiddenFlags the hiddenFlags object new value. - * + * This method returns the deathsMax object. + * @return the deathsMax object. */ - public void setHiddenFlags(List hiddenFlags) + @Override + public int getDeathsMax() { - this.hiddenFlags = hiddenFlags; + return deathsMax; } /** - * This method sets the visitorBannedCommands object value. - * @param visitorBannedCommands the visitorBannedCommands object new value. - * + * This method returns the teamJoinDeathReset object. + * @return the teamJoinDeathReset object. */ - public void setVisitorBannedCommands(List visitorBannedCommands) + @Override + public boolean isTeamJoinDeathReset() { - this.visitorBannedCommands = visitorBannedCommands; + return teamJoinDeathReset; } /** - * This method sets the fallingBannedCommands object value. - * @param fallingBannedCommands the fallingBannedCommands object new value. - * + * This method returns the geoLimitSettings object. + * @return the geoLimitSettings object. */ - public void setFallingBannedCommands(List fallingBannedCommands) + @Override + public List getGeoLimitSettings() { - this.fallingBannedCommands = fallingBannedCommands; + return geoLimitSettings; } /** - * This method sets the maxTeamSize object value. - * @param maxTeamSize the maxTeamSize object new value. - * + * This method returns the ivSettings object. + * @return the ivSettings object. */ - public void setMaxTeamSize(int maxTeamSize) + @Override + public List getIvSettings() { - this.maxTeamSize = maxTeamSize; + return ivSettings; } /** - * This method sets the maxHomes object value. - * @param maxHomes the maxHomes object new value. - * + * @return the permission prefix */ - public void setMaxHomes(int maxHomes) + @Override + public String getPermissionPrefix() { - this.maxHomes = maxHomes; + return "caveblock"; } /** - * This method sets the resetLimit object value. - * @param resetLimit the resetLimit object new value. - * + * @return true if water is not safe in this world, e.g, should not be a home location */ - public void setResetLimit(int resetLimit) + @Override + public boolean isWaterUnsafe() { - this.resetLimit = resetLimit; + return false; } /** - * This method sets the leaversLoseReset object value. - * @param leaversLoseReset the leaversLoseReset object new value. - * + * This method returns the resetEpoch object. + * @return the resetEpoch object. */ - public void setLeaversLoseReset(boolean leaversLoseReset) + @Override + public long getResetEpoch() { - this.leaversLoseReset = leaversLoseReset; + return resetEpoch; } /** - * This method sets the kickedKeepInventory object value. - * @param kickedKeepInventory the kickedKeepInventory object new value. - * + * This method returns the worldDepth value. + * @return the value of worldDepth. */ - public void setKickedKeepInventory(boolean kickedKeepInventory) + public int getWorldDepth() { - this.kickedKeepInventory = kickedKeepInventory; + return worldDepth; } /** - * This method sets the onJoinResetMoney object value. - * @param onJoinResetMoney the onJoinResetMoney object new value. - * + * This method returns the normalRoof value. + * @return the value of normalRoof. */ - public void setOnJoinResetMoney(boolean onJoinResetMoney) + public boolean isNormalRoof() { - this.onJoinResetMoney = onJoinResetMoney; + return normalRoof; } /** - * This method sets the onJoinResetInventory object value. - * @param onJoinResetInventory the onJoinResetInventory object new value. - * + * This method returns the normalFloor value. + * @return the value of normalFloor. */ - public void setOnJoinResetInventory(boolean onJoinResetInventory) + public boolean isNormalFloor() { - this.onJoinResetInventory = onJoinResetInventory; + return normalFloor; } /** - * This method sets the onJoinResetEnderChest object value. - * @param onJoinResetEnderChest the onJoinResetEnderChest object new value. - * + * This method returns the normalMainBlock value. + * @return the value of normalMainBlock. */ - public void setOnJoinResetEnderChest(boolean onJoinResetEnderChest) + public Material getNormalMainBlock() { - this.onJoinResetEnderChest = onJoinResetEnderChest; + return normalMainBlock; } /** - * This method sets the onLeaveResetMoney object value. - * @param onLeaveResetMoney the onLeaveResetMoney object new value. - * + * This method returns the normalBlocks value. + * @return the value of normalBlocks. */ - public void setOnLeaveResetMoney(boolean onLeaveResetMoney) + public List getNormalBlocks() { - this.onLeaveResetMoney = onLeaveResetMoney; + return normalBlocks; } /** - * This method sets the onLeaveResetInventory object value. - * @param onLeaveResetInventory the onLeaveResetInventory object new value. - * + * This method returns the netherFloor value. + * @return the value of netherFloor. */ - public void setOnLeaveResetInventory(boolean onLeaveResetInventory) + public boolean isNetherFloor() { - this.onLeaveResetInventory = onLeaveResetInventory; + return netherFloor; } /** - * This method sets the onLeaveResetEnderChest object value. - * @param onLeaveResetEnderChest the onLeaveResetEnderChest object new value. - * + * This method returns the netherMainBlock value. + * @return the value of netherMainBlock. */ - public void setOnLeaveResetEnderChest(boolean onLeaveResetEnderChest) + public Material getNetherMainBlock() { - this.onLeaveResetEnderChest = onLeaveResetEnderChest; + return netherMainBlock; } /** - * This method sets the createCaveOnFirstLoginEnabled object value. - * @param createIslandOnFirstLoginEnabled the createCaveOnFirstLoginEnabled object new value. - * + * This method returns the netherBlocks value. + * @return the value of netherBlocks. */ - public void setCreateIslandOnFirstLoginEnabled(boolean createIslandOnFirstLoginEnabled) + public List getNetherBlocks() { - this.createIslandOnFirstLoginEnabled = createIslandOnFirstLoginEnabled; + return netherBlocks; } + /** - * This method sets the createCaveOnFirstLoginDelay object value. - * @param createIslandOnFirstLoginDelay the createCaveOnFirstLoginDelay object new value. - * + * This method returns the endRoof value. + * @return the value of endRoof. */ - public void setCreateIslandOnFirstLoginDelay(int createIslandOnFirstLoginDelay) + public boolean isEndRoof() { - this.createIslandOnFirstLoginDelay = createIslandOnFirstLoginDelay; + return endRoof; } /** - * This method sets the createCaveOnFirstLoginDelay object value. - * @param createIslandOnFirstLoginAbortOnLogout the createCaveOnFirstLoginDelay object new value. - * + * This method returns the endFloor value. + * @return the value of endFloor. */ - public void setCreateIslandOnFirstLoginAbortOnLogout(boolean createIslandOnFirstLoginAbortOnLogout) + public boolean isEndFloor() { - this.createIslandOnFirstLoginAbortOnLogout = createIslandOnFirstLoginAbortOnLogout; + return endFloor; } /** - * This method sets the allowSetHomeInNether object value. - * @param allowSetHomeInNether the allowSetHomeInNether object new value. - * + * This method returns the endMainBlock value. + * @return the value of endMainBlock. */ - public void setAllowSetHomeInNether(boolean allowSetHomeInNether) + public Material getEndMainBlock() { - this.allowSetHomeInNether = allowSetHomeInNether; + return endMainBlock; } /** - * This method sets the requireConfirmationToSetHomeInNether object value. - * @param requireConfirmationToSetHomeInNether the requireConfirmationToSetHomeInNether object new value. - * + * This method returns the endBlocks value. + * @return the value of endBlocks. */ - public void setRequireConfirmationToSetHomeInNether(boolean requireConfirmationToSetHomeInNether) + public List getEndBlocks() { - this.requireConfirmationToSetHomeInNether = requireConfirmationToSetHomeInNether; + return endBlocks; } /** - * This method sets the allowSetHomeInTheEnd object value. - * @param allowSetHomeInTheEnd the allowSetHomeInTheEnd object new value. - * + * This method returns the numberOfBlockGenerationTries value. + * @return the value of numberOfBlockGenerationTries. */ - public void setAllowSetHomeInTheEnd(boolean allowSetHomeInTheEnd) + public int getNumberOfBlockGenerationTries() { - this.allowSetHomeInTheEnd = allowSetHomeInTheEnd; + return numberOfBlockGenerationTries; } - /** - * This method sets the requireConfirmationToSetHomeInTheEnd object value. - * @param requireConfirmationToSetHomeInTheEnd the requireConfirmationToSetHomeInTheEnd object new value. - * + * This method returns the newMaterialGenerator value. + * @return the value of newMaterialGenerator. */ - public void setRequireConfirmationToSetHomeInTheEnd(boolean requireConfirmationToSetHomeInTheEnd) + public boolean isNewMaterialGenerator() { - this.requireConfirmationToSetHomeInTheEnd = requireConfirmationToSetHomeInTheEnd; + return newMaterialGenerator; } /** - * This method sets the deathsCounted object value. - * @param deathsCounted the deathsCounted object new value. - * + * {@inheritDoc} */ - public void setDeathsCounted(boolean deathsCounted) + @Override + public List getMobLimitSettings() { - this.deathsCounted = deathsCounted; + return mobLimitSettings; } /** - * This method sets the deathsResetOnNewIsland value. - * @param deathsResetOnNewIsland the deathsResetOnNewIsland new value. - * + * {@inheritDoc} */ - public void setDeathsResetOnNewIsland(boolean deathsResetOnNewIsland) + @Override + public String getPlayerCommandAliases() { - this.deathsResetOnNewIsland = deathsResetOnNewIsland; + return playerCommandAliases; } /** - * This method sets the deathsMax object value. - * @param deathsMax the deathsMax object new value. - * + * {@inheritDoc} */ - public void setDeathsMax(int deathsMax) + @Override + public String getAdminCommandAliases() { - this.deathsMax = deathsMax; + return adminCommandAliases; } /** - * This method sets the teamJoinDeathReset object value. - * @param teamJoinDeathReset the teamJoinDeathReset object new value. - * + * {@inheritDoc} */ - public void setTeamJoinDeathReset(boolean teamJoinDeathReset) + @Override + public String getDefaultPlayerAction() { - this.teamJoinDeathReset = teamJoinDeathReset; + return defaultPlayerAction; } /** - * This method sets the geoLimitSettings object value. - * @param geoLimitSettings the geoLimitSettings object new value. - * + * {@inheritDoc} */ - public void setGeoLimitSettings(List geoLimitSettings) + @Override + public String getDefaultNewPlayerAction() { - this.geoLimitSettings = geoLimitSettings; + return defaultNewPlayerAction; } /** - * This method sets the ivSettings object value. - * @param ivSettings the ivSettings object new value. - * + * {@inheritDoc} */ - public void setIvSettings(List ivSettings) + @Override + public boolean isMakeNetherPortals() { - this.ivSettings = ivSettings; + return this.makeNetherPortals; } + /** - * This method sets the resetEpoch object value. - * @param resetEpoch the resetEpoch object new value. - * + * {@inheritDoc} */ @Override - public void setResetEpoch(long resetEpoch) + public boolean isMakeEndPortals() { - this.resetEpoch = resetEpoch; + return this.makeEndPortals; } /** - * This method sets the worldDepth value. - * @param worldDepth the worldDepth new value. - * + * {@inheritDoc} */ - public void setWorldDepth(int worldDepth) + @Override + public @NonNull List getOnRespawnCommands() { - this.worldDepth = worldDepth; + return this.onRespawnCommands; } + // --------------------------------------------------------------------- + // Section: Setters + // --------------------------------------------------------------------- + /** - * This method sets the normalRoof value. - * @param normalRoof the normalRoof new value. - * + * @param maxCoopSize the maxCoopSize to set */ - public void setNormalRoof(boolean normalRoof) - { - this.normalRoof = normalRoof; + public void setMaxCoopSize(int maxCoopSize) { + this.maxCoopSize = maxCoopSize; } + /** + * @param maxTrustSize the maxTrustSize to set + */ + public void setMaxTrustSize(int maxTrustSize) { + this.maxTrustSize = maxTrustSize; + } /** - * This method sets the normalFloor value. - * @param normalFloor the normalFloor new value. + * This method sets the friendlyName object value. + * @param friendlyName the friendlyName object new value. * */ - public void setNormalFloor(boolean normalFloor) + public void setFriendlyName(String friendlyName) { - this.normalFloor = normalFloor; + this.friendlyName = friendlyName; } /** - * This method sets the normalMainBlock value. - * @param normalMainBlock the normalMainBlock new value. + * This method sets the worldName object value. + * @param worldName the worldName object new value. * */ - public void setNormalMainBlock(Material normalMainBlock) + public void setWorldName(String worldName) { - this.normalMainBlock = normalMainBlock; + this.worldName = worldName; } /** - * This method sets the normalBlocks value. - * @param normalBlocks the normalBlocks new value. + * This method sets the difficulty object value. + * @param difficulty the difficulty object new value. * */ - public void setNormalBlocks(List normalBlocks) + @Override + public void setDifficulty(Difficulty difficulty) { - this.normalBlocks = normalBlocks; + this.difficulty = difficulty; } /** - * This method sets the netherFloor value. - * @param netherFloor the netherFloor new value. + * This method sets the islandDistance object value. + * @param islandDistance the islandDistance object new value. * */ - public void setNetherFloor(boolean netherFloor) + public void setIslandDistance(int islandDistance) { - this.netherFloor = netherFloor; + this.islandDistance = islandDistance; } /** - * This method sets the netherMainBlock value. - * @param netherMainBlock the netherMainBlock new value. + * This method sets the islandProtectionRange object value. + * @param islandProtectionRange the islandProtectionRange object new value. * */ - public void setNetherMainBlock(Material netherMainBlock) + public void setIslandProtectionRange(int islandProtectionRange) { - this.netherMainBlock = netherMainBlock; + this.islandProtectionRange = islandProtectionRange; } /** - * This method sets the netherBlocks value. - * @param netherBlocks the netherBlocks new value. + * This method sets the islandStartX object value. + * @param islandStartX the islandStartX object new value. * */ - public void setNetherBlocks(List netherBlocks) + public void setIslandStartX(int islandStartX) { - this.netherBlocks = netherBlocks; + this.islandStartX = islandStartX; } /** - * This method sets the endRoof value. - * @param endRoof the endRoof new value. + * This method sets the islandStartZ object value. + * @param islandStartZ the islandStartZ object new value. * */ - public void setEndRoof(boolean endRoof) + public void setIslandStartZ(int islandStartZ) { - this.endRoof = endRoof; + this.islandStartZ = islandStartZ; } /** - * This method sets the endFloor value. - * @param endFloor the endFloor new value. + * This method sets the islandXOffset object value. + * @param islandXOffset the islandXOffset object new value. * */ - public void setEndFloor(boolean endFloor) + public void setIslandXOffset(int islandXOffset) { - this.endFloor = endFloor; + this.islandXOffset = islandXOffset; } /** - * This method sets the endMainBlock value. - * @param endMainBlock the endMainBlock new value. + * This method sets the islandZOffset object value. + * @param islandZOffset the islandZOffset object new value. * */ - public void setEndMainBlock(Material endMainBlock) + public void setIslandZOffset(int islandZOffset) { - this.endMainBlock = endMainBlock; + this.islandZOffset = islandZOffset; } /** - * This method sets the endBlocks value. - * @param endBlocks the endBlocks new value. + * This method sets the islandHeight object value. + * @param islandHeight the islandHeight object new value. * */ - public void setEndBlocks(List endBlocks) + public void setIslandHeight(int islandHeight) { - this.endBlocks = endBlocks; + this.islandHeight = islandHeight; } /** - * This method sets the numberOfBlockGenerationTries value. - * @param numberOfBlockGenerationTries the numberOfBlockGenerationTries new value. + * This method sets the maxIslands object value. + * @param maxIslands the maxIslands object new value. * */ - public void setNumberOfBlockGenerationTries(int numberOfBlockGenerationTries) + public void setMaxIslands(int maxIslands) { - this.numberOfBlockGenerationTries = numberOfBlockGenerationTries; + this.maxIslands = maxIslands; } /** - * This method sets the newMaterialGenerator value. - * @param newMaterialGenerator the numberOfBlockGenerationTries new value. + * This method sets the defaultGameMode object value. + * @param defaultGameMode the defaultGameMode object new value. * */ - public void setNewMaterialGenerator(boolean newMaterialGenerator) + public void setDefaultGameMode(GameMode defaultGameMode) { - this.newMaterialGenerator = newMaterialGenerator; + this.defaultGameMode = defaultGameMode; } /** - * @return the debug + * This method sets the defaultBiome object value. + * @param defaultBiome the defaultBiome object new value. + * */ - public boolean isDebug() { - return debug; + public void setDefaultBiome(Biome defaultBiome) + { + this.defaultBiome = defaultBiome; } /** - * @param debug the debug to set + * This method sets the banLimit object value. + * @param banLimit the banLimit object new value. + * */ - public void setDebug(boolean debug) { - this.debug = debug; + public void setBanLimit(int banLimit) + { + this.banLimit = banLimit; } /** - * This method sets the playerCommandAliases value. - * @param playerCommandAliases the playerCommandAliases new value. + * This method sets the netherGenerate object value. + * @param netherGenerate the netherGenerate object new value. * */ - public void setPlayerCommandAliases(String playerCommandAliases) + public void setNetherGenerate(boolean netherGenerate) { - this.playerCommandAliases = playerCommandAliases; + this.netherGenerate = netherGenerate; } /** - * This method sets the adminCommandAliases value. - * @param adminCommandAliases the adminCommandAliases new value. + * This method sets the netherIslands object value. + * @param netherIslands the netherIslands object new value. * */ - public void setAdminCommandAliases(String adminCommandAliases) + public void setNetherIslands(boolean netherIslands) { - this.adminCommandAliases = adminCommandAliases; + this.netherIslands = netherIslands; } + /** - * @return the onJoinCommands + * This method sets the netherRoof object value. + * @param netherRoof the netherRoof object new value. + * */ - @NonNull - @Override - public List getOnJoinCommands() { - return onJoinCommands; + public void setNetherRoof(boolean netherRoof) + { + this.netherRoof = netherRoof; } /** - * @param onJoinCommands the onJoinCommands to set + * This method sets the netherSpawnRadius object value. + * @param netherSpawnRadius the netherSpawnRadius object new value. + * */ - public void setOnJoinCommands(List onJoinCommands) { - this.onJoinCommands = onJoinCommands; + public void setNetherSpawnRadius(int netherSpawnRadius) + { + this.netherSpawnRadius = netherSpawnRadius; } /** - * @return the onLeaveCommands + * This method sets the endGenerate object value. + * @param endGenerate the endGenerate object new value. + * */ - @NonNull - @Override - public List getOnLeaveCommands() { - return onLeaveCommands; + public void setEndGenerate(boolean endGenerate) + { + this.endGenerate = endGenerate; } /** - * @param onLeaveCommands the onLeaveCommands to set + * This method sets the endIslands object value. + * @param endIslands the endIslands object new value. + * */ - public void setOnLeaveCommands(List onLeaveCommands) { - this.onLeaveCommands = onLeaveCommands; + public void setEndIslands(boolean endIslands) + { + this.endIslands = endIslands; } + /** - * @return the onJoinResetHealth + * This method sets the dragonSpawn object value. + * @param dragonSpawn the dragonSpawn object new value. + * */ - @Override - public boolean isOnJoinResetHealth() { - return onJoinResetHealth; + public void setDragonSpawn(boolean dragonSpawn) + { + this.dragonSpawn = dragonSpawn; } /** - * @param onJoinResetHealth the onJoinResetHealth to set + * This method sets the removeMobsWhitelist object value. + * @param removeMobsWhitelist the removeMobsWhitelist object new value. + * */ - public void setOnJoinResetHealth(boolean onJoinResetHealth) { - this.onJoinResetHealth = onJoinResetHealth; + public void setRemoveMobsWhitelist(Set removeMobsWhitelist) + { + this.removeMobsWhitelist = removeMobsWhitelist; } /** - * @return the onJoinResetHunger + * This method sets the worldFlags object value. + * @param worldFlags the worldFlags object new value. + * */ - @Override - public boolean isOnJoinResetHunger() { - return onJoinResetHunger; + public void setWorldFlags(Map worldFlags) + { + this.worldFlags = worldFlags; } /** - * @param onJoinResetHunger the onJoinResetHunger to set + * This method sets the defaultIslandFlags object value. + * @param defaultIslandFlags the defaultIslandFlags object new value. + * */ - public void setOnJoinResetHunger(boolean onJoinResetHunger) { - this.onJoinResetHunger = onJoinResetHunger; + public void setDefaultIslandFlags(Map defaultIslandFlags) + { + this.defaultIslandFlags = defaultIslandFlags; } /** - * @return the onJoinResetXP + * This method sets the defaultIslandSettings object value. + * @param defaultIslandSettings the defaultIslandSettings object new value. + * */ - @Override - public boolean isOnJoinResetXP() { - return onJoinResetXP; + public void setDefaultIslandSettings(Map defaultIslandSettings) + { + this.defaultIslandSettings = defaultIslandSettings; } /** - * @param onJoinResetXP the onJoinResetXP to set + * This method sets the hiddenFlags object value. + * @param hiddenFlags the hiddenFlags object new value. + * */ - public void setOnJoinResetXP(boolean onJoinResetXP) { - this.onJoinResetXP = onJoinResetXP; + public void setHiddenFlags(List hiddenFlags) + { + this.hiddenFlags = hiddenFlags; } /** - * @return the onLeaveResetHealth + * This method sets the visitorBannedCommands object value. + * @param visitorBannedCommands the visitorBannedCommands object new value. + * */ - @Override - public boolean isOnLeaveResetHealth() { - return onLeaveResetHealth; + public void setVisitorBannedCommands(List visitorBannedCommands) + { + this.visitorBannedCommands = visitorBannedCommands; } /** - * @param onLeaveResetHealth the onLeaveResetHealth to set + * This method sets the fallingBannedCommands object value. + * @param fallingBannedCommands the fallingBannedCommands object new value. + * */ - public void setOnLeaveResetHealth(boolean onLeaveResetHealth) { - this.onLeaveResetHealth = onLeaveResetHealth; + public void setFallingBannedCommands(List fallingBannedCommands) + { + this.fallingBannedCommands = fallingBannedCommands; } /** - * @return the onLeaveResetHunger + * This method sets the maxTeamSize object value. + * @param maxTeamSize the maxTeamSize object new value. + * */ - @Override - public boolean isOnLeaveResetHunger() { - return onLeaveResetHunger; + public void setMaxTeamSize(int maxTeamSize) + { + this.maxTeamSize = maxTeamSize; } /** - * @param onLeaveResetHunger the onLeaveResetHunger to set + * This method sets the maxHomes object value. + * @param maxHomes the maxHomes object new value. + * */ - public void setOnLeaveResetHunger(boolean onLeaveResetHunger) { - this.onLeaveResetHunger = onLeaveResetHunger; + public void setMaxHomes(int maxHomes) + { + this.maxHomes = maxHomes; } /** - * @return the onLeaveResetXP + * This method sets the resetLimit object value. + * @param resetLimit the resetLimit object new value. + * */ - @Override - public boolean isOnLeaveResetXP() { - return onLeaveResetXP; + public void setResetLimit(int resetLimit) + { + this.resetLimit = resetLimit; } /** - * @param onLeaveResetXP the onLeaveResetXP to set + * This method sets the leaversLoseReset object value. + * @param leaversLoseReset the leaversLoseReset object new value. + * */ - public void setOnLeaveResetXP(boolean onLeaveResetXP) { - this.onLeaveResetXP = onLeaveResetXP; + public void setLeaversLoseReset(boolean leaversLoseReset) + { + this.leaversLoseReset = leaversLoseReset; } /** - * Method Settings#isTeleportPlayerToIslandUponIslandCreation returns the teleportPlayerToIslandUponIslandCreation of this object. + * This method sets the kickedKeepInventory object value. + * @param kickedKeepInventory the kickedKeepInventory object new value. * - * @return the teleportPlayerToIslandUponIslandCreation (type boolean) of this object. */ - @Override - public boolean isTeleportPlayerToIslandUponIslandCreation() + public void setKickedKeepInventory(boolean kickedKeepInventory) { - return teleportPlayerToIslandUponIslandCreation; + this.kickedKeepInventory = kickedKeepInventory; } /** - * Method Settings#setTeleportPlayerToIslandUponIslandCreation sets new value for the teleportPlayerToIslandUponIslandCreation of this object. - * @param teleportPlayerToIslandUponIslandCreation new value for this object. + * This method sets the onJoinResetMoney object value. + * @param onJoinResetMoney the onJoinResetMoney object new value. * */ - public void setTeleportPlayerToIslandUponIslandCreation(boolean teleportPlayerToIslandUponIslandCreation) + public void setOnJoinResetMoney(boolean onJoinResetMoney) { - this.teleportPlayerToIslandUponIslandCreation = teleportPlayerToIslandUponIslandCreation; + this.onJoinResetMoney = onJoinResetMoney; } /** - * Method Settings#isPasteMissingIslands returns the pasteMissingIslands of this object. + * This method sets the onJoinResetInventory object value. + * @param onJoinResetInventory the onJoinResetInventory object new value. * - * @return the pasteMissingIslands (type boolean) of this object. */ - @Override - public boolean isPasteMissingIslands() + public void setOnJoinResetInventory(boolean onJoinResetInventory) { - return pasteMissingIslands; + this.onJoinResetInventory = onJoinResetInventory; } /** - * Method Settings#setPasteMissingIslands sets new value for the pasteMissingIslands of this object. - * @param pasteMissingIslands new value for this object. + * This method sets the onJoinResetEnderChest object value. + * @param onJoinResetEnderChest the onJoinResetEnderChest object new value. * */ - public void setPasteMissingIslands(boolean pasteMissingIslands) + public void setOnJoinResetEnderChest(boolean onJoinResetEnderChest) { - this.pasteMissingIslands = pasteMissingIslands; + this.onJoinResetEnderChest = onJoinResetEnderChest; } /** - * Method Settings#setDefaultPlayerAction sets new value for the defaultPlayerAction of this object. - * @param defaultPlayerAction new value for this object. + * This method sets the onLeaveResetMoney object value. + * @param onLeaveResetMoney the onLeaveResetMoney object new value. + * */ - public void setDefaultPlayerAction(String defaultPlayerAction) + public void setOnLeaveResetMoney(boolean onLeaveResetMoney) { - this.defaultPlayerAction = defaultPlayerAction; + this.onLeaveResetMoney = onLeaveResetMoney; } /** - * Method Settings#setDefaultNewPlayerAction sets new value for the defaultNewPlayerAction of this object. - * @param defaultNewPlayerAction new value for this object. + * This method sets the onLeaveResetInventory object value. + * @param onLeaveResetInventory the onLeaveResetInventory object new value. + * */ - public void setDefaultNewPlayerAction(String defaultNewPlayerAction) + public void setOnLeaveResetInventory(boolean onLeaveResetInventory) { - this.defaultNewPlayerAction = defaultNewPlayerAction; + this.onLeaveResetInventory = onLeaveResetInventory; } /** - * Method Settings#setMobLimitSettings sets new value for the mobLimitSettings of this object. - * @param mobLimitSettings new value for this object. + * This method sets the onLeaveResetEnderChest object value. + * @param onLeaveResetEnderChest the onLeaveResetEnderChest object new value. + * */ - public void setMobLimitSettings(List mobLimitSettings) + public void setOnLeaveResetEnderChest(boolean onLeaveResetEnderChest) { - this.mobLimitSettings = mobLimitSettings; + this.onLeaveResetEnderChest = onLeaveResetEnderChest; } /** - * Method Settings#getDefaultNetherBiome returns the defaultNetherBiome of this object. + * This method sets the createCaveOnFirstLoginEnabled object value. + * @param createIslandOnFirstLoginEnabled the createCaveOnFirstLoginEnabled object new value. * - * @return the defaultNetherBiome (type Biome) of this object. */ - public Biome getDefaultNetherBiome() + public void setCreateIslandOnFirstLoginEnabled(boolean createIslandOnFirstLoginEnabled) { - return defaultNetherBiome; + this.createIslandOnFirstLoginEnabled = createIslandOnFirstLoginEnabled; } - /** - * Method Settings#setDefaultNetherBiome sets new value for the defaultNetherBiome of this object. - * @param defaultNetherBiome new value for this object. + * This method sets the createCaveOnFirstLoginDelay object value. + * @param createIslandOnFirstLoginDelay the createCaveOnFirstLoginDelay object new value. * */ - public void setDefaultNetherBiome(Biome defaultNetherBiome) + public void setCreateIslandOnFirstLoginDelay(int createIslandOnFirstLoginDelay) { - this.defaultNetherBiome = defaultNetherBiome; + this.createIslandOnFirstLoginDelay = createIslandOnFirstLoginDelay; } /** - * Method Settings#getDefaultTheEndBiome returns the defaultTheEndBiome of this object. + * This method sets the createCaveOnFirstLoginDelay object value. + * @param createIslandOnFirstLoginAbortOnLogout the createCaveOnFirstLoginDelay object new value. * - * @return the defaultTheEndBiome (type Biome) of this object. */ - public Biome getDefaultTheEndBiome() + public void setCreateIslandOnFirstLoginAbortOnLogout(boolean createIslandOnFirstLoginAbortOnLogout) { - return defaultTheEndBiome; + this.createIslandOnFirstLoginAbortOnLogout = createIslandOnFirstLoginAbortOnLogout; } /** - * Method Settings#setDefaultTheEndBiome sets new value for the defaultTheEndBiome of this object. - * @param defaultTheEndBiome new value for this object. + * This method sets the allowSetHomeInNether object value. + * @param allowSetHomeInNether the allowSetHomeInNether object new value. * */ - public void setDefaultTheEndBiome(Biome defaultTheEndBiome) + public void setAllowSetHomeInNether(boolean allowSetHomeInNether) { - this.defaultTheEndBiome = defaultTheEndBiome; + this.allowSetHomeInNether = allowSetHomeInNether; } + /** - * @return the spawnLimitMonsters + * This method sets the requireConfirmationToSetHomeInNether object value. + * @param requireConfirmationToSetHomeInNether the requireConfirmationToSetHomeInNether object new value. + * */ - public int getSpawnLimitMonsters() { - return spawnLimitMonsters; + public void setRequireConfirmationToSetHomeInNether(boolean requireConfirmationToSetHomeInNether) + { + this.requireConfirmationToSetHomeInNether = requireConfirmationToSetHomeInNether; } + /** - * @param spawnLimitMonsters the spawnLimitMonsters to set + * This method sets the allowSetHomeInTheEnd object value. + * @param allowSetHomeInTheEnd the allowSetHomeInTheEnd object new value. + * */ - public void setSpawnLimitMonsters(int spawnLimitMonsters) { - this.spawnLimitMonsters = spawnLimitMonsters; + public void setAllowSetHomeInTheEnd(boolean allowSetHomeInTheEnd) + { + this.allowSetHomeInTheEnd = allowSetHomeInTheEnd; } + /** - * @return the spawnLimitAnimals + * This method sets the requireConfirmationToSetHomeInTheEnd object value. + * @param requireConfirmationToSetHomeInTheEnd the requireConfirmationToSetHomeInTheEnd object new value. + * */ - public int getSpawnLimitAnimals() { - return spawnLimitAnimals; + public void setRequireConfirmationToSetHomeInTheEnd(boolean requireConfirmationToSetHomeInTheEnd) + { + this.requireConfirmationToSetHomeInTheEnd = requireConfirmationToSetHomeInTheEnd; } + /** - * @param spawnLimitAnimals the spawnLimitAnimals to set + * This method sets the deathsCounted object value. + * @param deathsCounted the deathsCounted object new value. + * */ - public void setSpawnLimitAnimals(int spawnLimitAnimals) { - this.spawnLimitAnimals = spawnLimitAnimals; + public void setDeathsCounted(boolean deathsCounted) + { + this.deathsCounted = deathsCounted; } + /** - * @return the spawnLimitWaterAnimals + * This method sets the deathsResetOnNewIsland value. + * @param deathsResetOnNewIsland the deathsResetOnNewIsland new value. + * */ - public int getSpawnLimitWaterAnimals() { - return spawnLimitWaterAnimals; + public void setDeathsResetOnNewIsland(boolean deathsResetOnNewIsland) + { + this.deathsResetOnNewIsland = deathsResetOnNewIsland; } + /** - * @param spawnLimitWaterAnimals the spawnLimitWaterAnimals to set + * This method sets the deathsMax object value. + * @param deathsMax the deathsMax object new value. + * */ - public void setSpawnLimitWaterAnimals(int spawnLimitWaterAnimals) { - this.spawnLimitWaterAnimals = spawnLimitWaterAnimals; + public void setDeathsMax(int deathsMax) + { + this.deathsMax = deathsMax; } + /** - * @return the spawnLimitAmbient + * This method sets the teamJoinDeathReset object value. + * @param teamJoinDeathReset the teamJoinDeathReset object new value. + * */ - public int getSpawnLimitAmbient() { - return spawnLimitAmbient; + public void setTeamJoinDeathReset(boolean teamJoinDeathReset) + { + this.teamJoinDeathReset = teamJoinDeathReset; } + /** - * @param spawnLimitAmbient the spawnLimitAmbient to set + * This method sets the geoLimitSettings object value. + * @param geoLimitSettings the geoLimitSettings object new value. + * */ - public void setSpawnLimitAmbient(int spawnLimitAmbient) { - this.spawnLimitAmbient = spawnLimitAmbient; + public void setGeoLimitSettings(List geoLimitSettings) + { + this.geoLimitSettings = geoLimitSettings; } + /** - * @return the ticksPerAnimalSpawns + * This method sets the ivSettings object value. + * @param ivSettings the ivSettings object new value. + * */ - public int getTicksPerAnimalSpawns() { - return ticksPerAnimalSpawns; + public void setIvSettings(List ivSettings) + { + this.ivSettings = ivSettings; } /** - * @param ticksPerAnimalSpawns the ticksPerAnimalSpawns to set + * This method sets the resetEpoch object value. + * @param resetEpoch the resetEpoch object new value. + * */ - public void setTicksPerAnimalSpawns(int ticksPerAnimalSpawns) { - this.ticksPerAnimalSpawns = ticksPerAnimalSpawns; + @Override + public void setResetEpoch(long resetEpoch) + { + this.resetEpoch = resetEpoch; } + /** - * @return the ticksPerMonsterSpawns + * This method sets the worldDepth value. + * @param worldDepth the worldDepth new value. + * */ - public int getTicksPerMonsterSpawns() { - return ticksPerMonsterSpawns; + public void setWorldDepth(int worldDepth) + { + this.worldDepth = worldDepth; } + /** - * @param ticksPerMonsterSpawns the ticksPerMonsterSpawns to set + * This method sets the normalRoof value. + * @param normalRoof the normalRoof new value. + * */ - public void setTicksPerMonsterSpawns(int ticksPerMonsterSpawns) { - this.ticksPerMonsterSpawns = ticksPerMonsterSpawns; + public void setNormalRoof(boolean normalRoof) + { + this.normalRoof = normalRoof; } - /* (non-Javadoc) - * @see world.bentobox.bentobox.api.configuration.WorldSettings#isCheckForBlocks() + + /** + * This method sets the normalFloor value. + * @param normalFloor the normalFloor new value. + * */ - @Override - public boolean isCheckForBlocks() { - // Do not check for blocks when looking for new island spots - return false; + public void setNormalFloor(boolean normalFloor) + { + this.normalFloor = normalFloor; } /** - * Sets make nether portals. + * This method sets the normalMainBlock value. + * @param normalMainBlock the normalMainBlock new value. * - * @param makeNetherPortals the make nether portals */ - public void setMakeNetherPortals(boolean makeNetherPortals) + public void setNormalMainBlock(Material normalMainBlock) { - this.makeNetherPortals = makeNetherPortals; + this.normalMainBlock = normalMainBlock; } /** - * Sets make end portals. + * This method sets the normalBlocks value. + * @param normalBlocks the normalBlocks new value. * - * @param makeEndPortals the make end portals */ - public void setMakeEndPortals(boolean makeEndPortals) + public void setNormalBlocks(List normalBlocks) { - this.makeEndPortals = makeEndPortals; + this.normalBlocks = normalBlocks; } /** - * Sets on respawn commands. + * This method sets the netherFloor value. + * @param netherFloor the netherFloor new value. * - * @param onRespawnCommands the on respawn commands */ - public void setOnRespawnCommands(List onRespawnCommands) + public void setNetherFloor(boolean netherFloor) { - this.onRespawnCommands = onRespawnCommands; + this.netherFloor = netherFloor; } /** - * Is generate caves boolean. + * This method sets the netherMainBlock value. + * @param netherMainBlock the netherMainBlock new value. * - * @return the boolean */ - public boolean isGenerateCaves() + public void setNetherMainBlock(Material netherMainBlock) { - return generateCaves; + this.netherMainBlock = netherMainBlock; } /** - * Sets generate caves. + * This method sets the netherBlocks value. + * @param netherBlocks the netherBlocks new value. * - * @param generateCaves the generate caves */ - public void setGenerateCaves(boolean generateCaves) + public void setNetherBlocks(List netherBlocks) { - this.generateCaves = generateCaves; + this.netherBlocks = netherBlocks; } /** - * Is generate natural bedrock boolean. + * This method sets the endRoof value. + * @param endRoof the endRoof new value. * - * @return the boolean */ - public boolean isGenerateNaturalBedrock() + public void setEndRoof(boolean endRoof) { - return generateNaturalBedrock; + this.endRoof = endRoof; } /** - * Sets generate natural bedrock. + * This method sets the endFloor value. + * @param endFloor the endFloor new value. * - * @param generateNaturalBedrock the generate natural bedrock */ - public void setGenerateNaturalBedrock(boolean generateNaturalBedrock) + public void setEndFloor(boolean endFloor) { - this.generateNaturalBedrock = generateNaturalBedrock; + this.endFloor = endFloor; } /** - * Is generate natural surface boolean. + * This method sets the endMainBlock value. + * @param endMainBlock the endMainBlock new value. * - * @return the boolean */ - public boolean isGenerateNaturalSurface() + public void setEndMainBlock(Material endMainBlock) { - return generateNaturalSurface; + this.endMainBlock = endMainBlock; } /** - * Sets generate natural surface. + * This method sets the endBlocks value. + * @param endBlocks the endBlocks new value. * - * @param generateNaturalSurface the generate natural surface */ - public void setGenerateNaturalSurface(boolean generateNaturalSurface) + public void setEndBlocks(List endBlocks) { - this.generateNaturalSurface = generateNaturalSurface; + this.endBlocks = endBlocks; } - @Override - public Map getDefaultIslandFlags() + /** + * This method sets the numberOfBlockGenerationTries value. + * @param numberOfBlockGenerationTries the numberOfBlockGenerationTries new value. + * + */ + public void setNumberOfBlockGenerationTries(int numberOfBlockGenerationTries) { - return Collections.emptyMap(); + this.numberOfBlockGenerationTries = numberOfBlockGenerationTries; } - @Override - public Map getDefaultIslandSettings() + /** + * This method sets the newMaterialGenerator value. + * @param newMaterialGenerator the numberOfBlockGenerationTries new value. + * + */ + public void setNewMaterialGenerator(boolean newMaterialGenerator) { - return Collections.emptyMap(); + this.newMaterialGenerator = newMaterialGenerator; } - // --------------------------------------------------------------------- - // Section: Variables - // --------------------------------------------------------------------- - + /** + * @return the debug + */ + public boolean isDebug() { + return debug; + } + /** + * @param debug the debug to set + */ + public void setDebug(boolean debug) { + this.debug = debug; + } - /* Commands */ - @ConfigComment("Cave Command. What command users will run to access their cave.") - @ConfigComment("To define alias, just separate commands with white space.") - @ConfigEntry(path = "caveblock.command.cave") - private String playerCommandAliases = "cave cb"; - @ConfigComment("The Cave admin command.") - @ConfigComment("To define alias, just separate commands with white space.") - @ConfigEntry(path = "caveblock.command.admin") - private String adminCommandAliases = "cbadmin cba"; + /** + * This method sets the playerCommandAliases value. + * @param playerCommandAliases the playerCommandAliases new value. + * + */ + public void setPlayerCommandAliases(String playerCommandAliases) + { + this.playerCommandAliases = playerCommandAliases; + } - @ConfigComment("The default action for new player command call.") - @ConfigComment("Sub-command of main player command that will be run on first player command call.") - @ConfigComment("By default it is sub-command 'create'.") - @ConfigEntry(path = "caveblock.command.new-player-action", since = "1.13.0") - private String defaultNewPlayerAction = "create"; - @ConfigComment("The default action for player command.") - @ConfigComment("Sub-command of main player command that will be run on each player command call.") - @ConfigComment("By default it is sub-command 'go'.") - @ConfigEntry(path = "caveblock.command.default-action", since = "1.13.0") - private String defaultPlayerAction = "go"; + /** + * This method sets the adminCommandAliases value. + * @param adminCommandAliases the adminCommandAliases new value. + * + */ + public void setAdminCommandAliases(String adminCommandAliases) + { + this.adminCommandAliases = adminCommandAliases; + } - /* WORLD */ - @ConfigComment("Friendly name for this world. Used in admin commands. Must be a single word") - @ConfigEntry(path = "world.friendly-name") - private String friendlyName = "CaveBlock"; + /** + * @return the onJoinCommands + */ + @NonNull + @Override + public List getOnJoinCommands() { + return onJoinCommands; + } - @ConfigComment("Name of the world - if it does not exist then it will be generated.") - @ConfigComment("It acts like a prefix for nether and end (e.g. CaveBlock-world, CaveBlock-world_nether, CaveBlock-world_end)") - @ConfigEntry(path = "world.world-name") - private String worldName = "caveblock-world"; - @ConfigComment("World difficulty setting - PEACEFUL, EASY, NORMAL, HARD") - @ConfigComment("Other plugins may override this setting") - @ConfigEntry(path = "world.difficulty") - private Difficulty difficulty = Difficulty.HARD; + /** + * @param onJoinCommands the onJoinCommands to set + */ + public void setOnJoinCommands(List onJoinCommands) { + this.onJoinCommands = onJoinCommands; + } - @ConfigComment("Spawn limits. These override the limits set in bukkit.yml") - @ConfigComment("If set to a negative number, the server defaults will be used") - @ConfigEntry(path = "world.spawn-limits.monsters", since = "1.15.1") - private int spawnLimitMonsters = -1; - @ConfigEntry(path = "world.spawn-limits.animals", since = "1.15.1") - private int spawnLimitAnimals = -1; - @ConfigEntry(path = "world.spawn-limits.water-animals", since = "1.15.1") - private int spawnLimitWaterAnimals = -1; - @ConfigEntry(path = "world.spawn-limits.ambient", since = "1.15.1") - private int spawnLimitAmbient = -1; - @ConfigComment("Setting to 0 will disable animal spawns, but this is not recommended. Minecraft default is 400.") - @ConfigComment("A negative value uses the server default") - @ConfigEntry(path = "world.spawn-limits.ticks-per-animal-spawns", since = "1.15.1") - private int ticksPerAnimalSpawns = -1; - @ConfigComment("Setting to 0 will disable monster spawns, but this is not recommended. Minecraft default is 400.") - @ConfigComment("A negative value uses the server default") - @ConfigEntry(path = "world.spawn-limits.ticks-per-monster-spawns", since = "1.15.1") - private int ticksPerMonsterSpawns = -1; - @ConfigComment("Radius of cave in blocks. (So distance between caves is twice this)") - @ConfigComment("Will be rounded up to the nearest 16 blocks.") - @ConfigComment("It is the same for every dimension : Overworld, Nether and End.") - @ConfigComment("This value cannot be changed mid-game and the plugin will not start if it is different.") - @ConfigEntry(path = "world.distance-between-caves", needsReset = true) - private int islandDistance = 100; + /** + * @return the onLeaveCommands + */ + @NonNull + @Override + public List getOnLeaveCommands() { + return onLeaveCommands; + } - @ConfigComment("Default protection range radius in blocks. Cannot be larger than distance.") - @ConfigComment("Admins can change protection sizes for players individually using /cbadmin range set ") - @ConfigComment("or set this permission: caveblock.island.range.") - @ConfigEntry(path = "world.protection-range") - private int islandProtectionRange = 50; - @ConfigComment("Start caves at these coordinates. This is where new caves will start in the") - @ConfigComment("world. These must be a factor of your cave distance, but the plugin will auto") - @ConfigComment("calculate the closest location on the grid. Caves develop around this location") - @ConfigComment("both positively and negatively in a square grid.") - @ConfigComment("If none of this makes sense, leave it at 0,0.") - @ConfigEntry(path = "world.start-x", needsReset = true) - private int islandStartX = 0; + /** + * @param onLeaveCommands the onLeaveCommands to set + */ + public void setOnLeaveCommands(List onLeaveCommands) { + this.onLeaveCommands = onLeaveCommands; + } - @ConfigEntry(path = "world.start-z", needsReset = true) - private int islandStartZ = 0; + /** + * @return the onJoinResetHealth + */ + @Override + public boolean isOnJoinResetHealth() { + return onJoinResetHealth; + } - @ConfigEntry(path = "world.offset-x") - private int islandXOffset; - @ConfigEntry(path = "world.offset-z") - private int islandZOffset; - @ConfigComment("Cave height - Lowest is 5.") - @ConfigComment("It is the y coordinate of the bedrock block in the schem.") - @ConfigEntry(path = "world.cave-height") - private int islandHeight = 60; + /** + * @param onJoinResetHealth the onJoinResetHealth to set + */ + public void setOnJoinResetHealth(boolean onJoinResetHealth) { + this.onJoinResetHealth = onJoinResetHealth; + } - @ConfigComment("Maximum number of caves in the world. Set to -1 or 0 for unlimited.") - @ConfigComment("If the number of caves is greater than this number, it will stop players from creating caves.") - @ConfigEntry(path = "world.max-caves") - private int maxIslands = -1; - @ConfigComment("The default game mode for this world. Players will be set to this mode when they create") - @ConfigComment("a new cave for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR") - @ConfigEntry(path = "world.default-game-mode") - private GameMode defaultGameMode = GameMode.SURVIVAL; + /** + * @return the onJoinResetHunger + */ + @Override + public boolean isOnJoinResetHunger() { + return onJoinResetHunger; + } - @ConfigComment("The default biome for the overworld") - @ConfigEntry(path = "world.default-biome") - private Biome defaultBiome = Enums.getIfPresent(Biome.class, "DRIPSTONE_CAVES").or(Biome.THE_VOID); - @ConfigComment("The maximum number of players a player can ban at any one time in this game mode.") - @ConfigComment("The permission caveblock.ban.maxlimit.X where X is a number can also be used per player") - @ConfigComment("-1 = unlimited") - @ConfigEntry(path = "world.ban-limit") - private int banLimit = -1; + /** + * @param onJoinResetHunger the onJoinResetHunger to set + */ + public void setOnJoinResetHunger(boolean onJoinResetHunger) { + this.onJoinResetHunger = onJoinResetHunger; + } - @ConfigComment("") - @ConfigComment("This is cave.. no height... only depth. If depth is set smaller than maximal world height, then area above will be empty.") - @ConfigComment("Should not be less than cave height.") - @ConfigEntry(path = "world.world-depth", needsReset = true) - private int worldDepth = 256; - @ConfigComment("This indicate how many times block should be tried to generate.") - @ConfigEntry(path = "world.generation-tries", needsReset = true) - private int numberOfBlockGenerationTries = 1; + /** + * @return the onJoinResetXP + */ + @Override + public boolean isOnJoinResetXP() { + return onJoinResetXP; + } - @ConfigComment("Should we use the new material generator ?") - @ConfigComment("This will generate ores and blocks similar to how vanilla does,") - @ConfigComment("but it will override the blocks settings of each world.") - @ConfigEntry(path = "world.use-new-material-generator", needsReset = true) - private boolean newMaterialGenerator = false; - @ConfigComment("") - @ConfigComment("Make over world roof of bedrock, if false, it will be made from stone.") - @ConfigEntry(path = "world.normal.roof", needsReset = true) - private boolean normalRoof = true; + /** + * @param onJoinResetXP the onJoinResetXP to set + */ + public void setOnJoinResetXP(boolean onJoinResetXP) { + this.onJoinResetXP = onJoinResetXP; + } - @ConfigComment("") - @ConfigComment("Option allows to toggle if world generator should generate natural(-ish) looking surface with dirt and grass blocks.") - @ConfigComment("Enabling this option will ignore roof setting.") - @ConfigComment("Default value is false.") - @ConfigEntry(path = "world.normal.natural-surface", needsReset = true, experimental = true) - private boolean generateNaturalSurface = false; - @ConfigComment("") - @ConfigComment("Option allows to toggle if world generator should generate natural looking caves.") - @ConfigComment("Default value is false.") - @ConfigEntry(path = "world.normal.natural-caves", needsReset = true) - private boolean generateCaves = false; + /** + * @return the onLeaveResetHealth + */ + @Override + public boolean isOnLeaveResetHealth() { + return onLeaveResetHealth; + } - @ConfigComment("Make over world floor of bedrock, if false, it will be made from stone.") - @ConfigEntry(path = "world.normal.floor", needsReset = true) - private boolean normalFloor = true; - @ConfigComment("") - @ConfigComment("Option allows to toggle if world generator should generate natural looking bedrock block patterns.") - @ConfigComment("Enabling this option will ignore floor setting.") - @ConfigComment("Default value is false.") - @ConfigEntry(path = "world.normal.natural-bedrock", needsReset = true) - private boolean generateNaturalBedrock = false; + /** + * @param onLeaveResetHealth the onLeaveResetHealth to set + */ + public void setOnLeaveResetHealth(boolean onLeaveResetHealth) { + this.onLeaveResetHealth = onLeaveResetHealth; + } - @ConfigComment("Main block of which world will be generated.") - @ConfigEntry(path = "world.normal.main-block", needsReset = true) - private Material normalMainBlock = Material.STONE; - @ConfigComment("Blocks that will occasionally replace main block by random chance.") - @ConfigComment("Blocks will replace only main-block and will try to create packs that") - @ConfigComment("are set in their strings. Chance of spawning also is required.") - @ConfigComment("For materials first string must be MATERIAL, for entity: ENTITY.") - @ConfigComment("Entities spawned via generator are not protected from despawing.") - @ConfigComment("Working only with 2 high mobs currently.") - @ConfigComment("Example:") - @ConfigComment("MATERIAL:DIAMOND_ORE:100:5 - means there is 100% chace of spawing diamonds") - @ConfigComment("where max amount in pack are 5 per each subchunk!") - @ConfigEntry(path = "world.normal.blocks", needsReset = true) - private List normalBlocks = new ArrayList<>(); + /** + * @return the onLeaveResetHunger + */ + @Override + public boolean isOnLeaveResetHunger() { + return onLeaveResetHunger; + } - // Nether - @ConfigComment("Generate Nether - if this is false, the nether world will not be made and access to") - @ConfigComment("the nether will not occur. Other plugins may still enable portal usage.") - @ConfigComment("Note: Some default challenges will not be possible if there is no nether.") - @ConfigComment("Note that with a standard nether all players arrive at the same portal and entering a") - @ConfigComment("portal will return them back to their caves.") - @ConfigEntry(path = "world.nether.generate") - private boolean netherGenerate = true; - @ConfigComment("Caves in Nether. Change to false for standard vanilla nether.") - @ConfigEntry(path = "world.nether.caves", needsReset = true) - private boolean netherIslands = true; + /** + * @param onLeaveResetHunger the onLeaveResetHunger to set + */ + public void setOnLeaveResetHunger(boolean onLeaveResetHunger) { + this.onLeaveResetHunger = onLeaveResetHunger; + } - @ConfigComment("The default biome for the nether world (this may affect what mobs can spawn)") - @ConfigEntry(path = "world.nether.biome", since = "1.14.0") - private Biome defaultNetherBiome = Enums.getIfPresent(Biome.class, "NETHER_WASTES").or(Biome.THE_VOID); - @ConfigComment("Nether spawn protection radius - this is the distance around the nether spawn") - @ConfigComment("that will be protected from player interaction (breaking blocks, pouring lava etc.)") - @ConfigComment("Minimum is 0 (not recommended), maximum is 100. Default is 25.") - @ConfigComment("Only applies to vanilla nether") - @ConfigEntry(path = "world.nether.spawn-radius") - private int netherSpawnRadius = 32; + /** + * @return the onLeaveResetXP + */ + @Override + public boolean isOnLeaveResetXP() { + return onLeaveResetXP; + } - @ConfigComment("Make over world roof of bedrock, if false, it will be made from stone") - @ConfigEntry(path = "world.nether.roof", needsReset = true) - private boolean netherRoof = true; - @ConfigComment("Make over world floor of bedrock, if false, it will be made from stone") - @ConfigEntry(path = "world.nether.floor", needsReset = true) - private boolean netherFloor = true; + /** + * @param onLeaveResetXP the onLeaveResetXP to set + */ + public void setOnLeaveResetXP(boolean onLeaveResetXP) { + this.onLeaveResetXP = onLeaveResetXP; + } - @ConfigComment("Main block of which world will be generated.") - @ConfigEntry(path = "world.nether.main-block", needsReset = true) - private Material netherMainBlock = Material.NETHERRACK; - @ConfigComment("Blocks that will occasionally replace main block by random chance.") - @ConfigComment("Blocks will replace only main-block and will try to create packs that") - @ConfigComment("are set in their strings. Chance of spawning also is required.") - @ConfigComment("For materials first string must be MATERIAL, for entity: ENTITY.") - @ConfigComment("Entities spawned via generator are not protected from despawing.") - @ConfigComment("Working only with 2 high mobs currently.") - @ConfigComment("Example:") - @ConfigComment("MATERIAL:DIAMOND_ORE:100:5 - means there is 100% chace of spawing diamonds") - @ConfigComment("where max amount in pack are 5 per each subchunk!") - @ConfigEntry(path = "world.nether.blocks", needsReset = true) - private List netherBlocks = new ArrayList<>(); + /** + * Method Settings#isTeleportPlayerToIslandUponIslandCreation returns the teleportPlayerToIslandUponIslandCreation of this object. + * + * @return the teleportPlayerToIslandUponIslandCreation (type boolean) of this object. + */ + @Override + public boolean isTeleportPlayerToIslandUponIslandCreation() + { + return teleportPlayerToIslandUponIslandCreation; + } - @ConfigComment("This option indicates if nether portals should be linked via dimensions.") - @ConfigComment("Option will simulate vanilla portal mechanics that links portals together") - @ConfigComment("or creates a new portal, if there is not a portal in that dimension.") - @ConfigEntry(path = "world.nether.create-and-link-portals") - private boolean makeNetherPortals = false; - // End - @ConfigEntry(path = "world.end.generate") - private boolean endGenerate = true; + /** + * Method Settings#setTeleportPlayerToIslandUponIslandCreation sets new value for the teleportPlayerToIslandUponIslandCreation of this object. + * @param teleportPlayerToIslandUponIslandCreation new value for this object. + * + */ + public void setTeleportPlayerToIslandUponIslandCreation(boolean teleportPlayerToIslandUponIslandCreation) + { + this.teleportPlayerToIslandUponIslandCreation = teleportPlayerToIslandUponIslandCreation; + } - @ConfigEntry(path = "world.end.caves", needsReset = true) - private boolean endIslands = true; - @ConfigComment("The default biome for the end world (this may affect what mobs can spawn)") - @ConfigEntry(path = "world.end.biome", since = "1.14.0") - private Biome defaultTheEndBiome = Enums.getIfPresent(Biome.class, "THE_END").or(Biome.THE_VOID); + /** + * Method Settings#isPasteMissingIslands returns the pasteMissingIslands of this object. + * + * @return the pasteMissingIslands (type boolean) of this object. + */ + @Override + public boolean isPasteMissingIslands() + { + return pasteMissingIslands; + } - @ConfigEntry(path = "world.end.dragon-spawn", experimental = true) - private boolean dragonSpawn = false; - @ConfigComment("Make over world roof of bedrock, if false, it will be made from stone") - @ConfigEntry(path = "world.end.roof", needsReset = true) - private boolean endRoof = true; + /** + * Method Settings#setPasteMissingIslands sets new value for the pasteMissingIslands of this object. + * @param pasteMissingIslands new value for this object. + * + */ + public void setPasteMissingIslands(boolean pasteMissingIslands) + { + this.pasteMissingIslands = pasteMissingIslands; + } - @ConfigComment("Make over world floor of bedrock, if false, it will be made from stone") - @ConfigEntry(path = "world.end.floor", needsReset = true) - private boolean endFloor = true; - @ConfigComment("Main block of which world will be generated.") - @ConfigEntry(path = "world.end.main-block", needsReset = true) - private Material endMainBlock = Material.END_STONE; + /** + * Method Settings#setDefaultPlayerAction sets new value for the defaultPlayerAction of this object. + * @param defaultPlayerAction new value for this object. + */ + public void setDefaultPlayerAction(String defaultPlayerAction) + { + this.defaultPlayerAction = defaultPlayerAction; + } - @ConfigComment("Blocks that will occasionally replace main block by random chance.") - @ConfigComment("Blocks will replace only main-block and will try to create packs that") - @ConfigComment("are set in their strings. Chance of spawning also is required.") - @ConfigComment("For materials first string must be MATERIAL, for entity: ENTITY.") - @ConfigComment("Entities spawned via generator are not protected from despawing.") - @ConfigComment("Working only with 2 high mobs currently.") - @ConfigComment("Example:") - @ConfigComment("MATERIAL:DIAMOND_ORE:100:5 - means there is 100% chace of spawing diamonds") - @ConfigComment("where max amount in pack are 5 per each subchunk!") - @ConfigEntry(path = "world.end.blocks", needsReset = true) - private List endBlocks = new ArrayList<>(); - @ConfigComment("This option indicates if obsidian platform in the end should be generated") - @ConfigComment("when player enters the end world.") - @ConfigEntry(path = "world.end.create-obsidian-platform") - private boolean makeEndPortals = false; + /** + * Method Settings#setDefaultNewPlayerAction sets new value for the defaultNewPlayerAction of this object. + * @param defaultNewPlayerAction new value for this object. + */ + public void setDefaultNewPlayerAction(String defaultNewPlayerAction) + { + this.defaultNewPlayerAction = defaultNewPlayerAction; + } - // Other staff. - @ConfigComment("Mob white list - these mobs will NOT be removed when logging in or doing /cave") - @ConfigEntry(path = "world.remove-mobs-whitelist") - private Set removeMobsWhitelist = new HashSet<>(); + /** + * Method Settings#setMobLimitSettings sets new value for the mobLimitSettings of this object. + * @param mobLimitSettings new value for this object. + */ + public void setMobLimitSettings(List mobLimitSettings) + { + this.mobLimitSettings = mobLimitSettings; + } - @ConfigComment("World flags. These are boolean settings for various flags for this world") - @ConfigEntry(path = "world.flags") - private Map worldFlags = new HashMap<>(); - @ConfigComment("These are the default protection settings for new caves.") - @ConfigComment("The value is the minimum cave rank required allowed to do the action.") - @ConfigComment("Ranks are the following:") - @ConfigComment(" VISITOR = 0") - @ConfigComment(" COOP = 200") - @ConfigComment(" TRUSTED = 400") - @ConfigComment(" MEMBER = 500") - @ConfigComment(" SUB-OWNER = 900") - @ConfigComment(" OWNER = 1000") - @ConfigEntry(path = "world.default-cave-flags") - private Map defaultIslandFlags = new HashMap<>(); + /** + * Method Settings#getDefaultNetherBiome returns the defaultNetherBiome of this object. + * + * @return the defaultNetherBiome (type Biome) of this object. + */ + public Biome getDefaultNetherBiome() + { + return defaultNetherBiome; + } - @ConfigComment("These are the default settings for new caves") - @ConfigEntry(path = "world.default-cave-settings") - private Map defaultIslandSettings = new HashMap<>(); - @ConfigComment("These settings/flags are hidden from users") - @ConfigComment("Ops can toggle hiding in-game using SHIFT-LEFT-CLICK on flags in settings") - @ConfigEntry(path = "world.hidden-flags") - private List hiddenFlags = new ArrayList<>(); + /** + * Method Settings#setDefaultNetherBiome sets new value for the defaultNetherBiome of this object. + * @param defaultNetherBiome new value for this object. + * + */ + public void setDefaultNetherBiome(Biome defaultNetherBiome) + { + this.defaultNetherBiome = defaultNetherBiome; + } - @ConfigComment("Visitor banned commands - Visitors to caves cannot use these commands in this world") - @ConfigEntry(path = "world.visitor-banned-commands") - private List visitorBannedCommands = new ArrayList<>(); - @ConfigComment("Falling banned commands - players cannot use these commands when falling") - @ConfigComment("if the PREVENT_TELEPORT_WHEN_FALLING world setting flag is active") - @ConfigEntry(path = "world.falling-banned-commands") - private List fallingBannedCommands = new ArrayList<>(); + /** + * Method Settings#getDefaultTheEndBiome returns the defaultTheEndBiome of this object. + * + * @return the defaultTheEndBiome (type Biome) of this object. + */ + public Biome getDefaultTheEndBiome() + { + return defaultTheEndBiome; + } - // --------------------------------------------- - /* Cave */ - @ConfigComment("Default max team size") - @ConfigComment("Permission size cannot be less than the default below. ") - @ConfigEntry(path = "cave.max-team-size") - private int maxTeamSize = 4; + /** + * Method Settings#setDefaultTheEndBiome sets new value for the defaultTheEndBiome of this object. + * @param defaultTheEndBiome new value for this object. + * + */ + public void setDefaultTheEndBiome(Biome defaultTheEndBiome) + { + this.defaultTheEndBiome = defaultTheEndBiome; + } - @ConfigComment("Default maximum number of coop rank members per cave") - @ConfigComment("Players can have the caveblock.coop.maxsize. permission to be bigger but") - @ConfigComment("permission size cannot be less than the default below. ") - @ConfigEntry(path = "cave.max-coop-size", since = "1.13.0") - private int maxCoopSize = 4; + /** + * @return the spawnLimitMonsters + */ + public int getSpawnLimitMonsters() { + return spawnLimitMonsters; + } - @ConfigComment("Default maximum number of trusted rank members per cave") - @ConfigComment("Players can have the caveblock.trust.maxsize. permission to be bigger but") - @ConfigComment("permission size cannot be less than the default below. ") - @ConfigEntry(path = "cave.max-trusted-size", since = "1.13.0") - private int maxTrustSize = 4; + /** + * @param spawnLimitMonsters the spawnLimitMonsters to set + */ + public void setSpawnLimitMonsters(int spawnLimitMonsters) { + this.spawnLimitMonsters = spawnLimitMonsters; + } - @ConfigComment("Default maximum number of homes a player can have. Min = 1") - @ConfigComment("Accessed via /cave sethome or /cave go ") - @ConfigEntry(path = "cave.max-homes") - private int maxHomes = 5; + /** + * @return the spawnLimitAnimals + */ + public int getSpawnLimitAnimals() { + return spawnLimitAnimals; + } - // Reset - @ConfigComment("How many resets a player is allowed (override with /cbadmin clearresets )") - @ConfigComment("Value of -1 means unlimited, 0 means hardcore - no resets.") - @ConfigComment("Example, 2 resets means they get 2 resets or 3 caves lifetime") - @ConfigEntry(path = "cave.reset.reset-limit") - private int resetLimit = -1; + /** + * @param spawnLimitAnimals the spawnLimitAnimals to set + */ + public void setSpawnLimitAnimals(int spawnLimitAnimals) { + this.spawnLimitAnimals = spawnLimitAnimals; + } - @ConfigComment("Kicked or leaving players lose resets") - @ConfigComment("Players who leave a team will lose a cave reset chance") - @ConfigComment("If a player has zero resets left and leaves a team, they cannot make a new") - @ConfigComment("cave by themselves and can only join a team.") - @ConfigComment("Leave this true to avoid players exploiting free caves") - @ConfigEntry(path = "cave.reset.leavers-lose-reset") - private boolean leaversLoseReset = false; + /** + * @return the spawnLimitWaterAnimals + */ + public int getSpawnLimitWaterAnimals() { + return spawnLimitWaterAnimals; + } - @ConfigComment("Allow kicked players to keep their inventory.") - @ConfigComment("Overrides the on-leave inventory reset for kicked players.") - @ConfigEntry(path = "cave.reset.kicked-keep-inventory") - private boolean kickedKeepInventory = false; + /** + * @param spawnLimitWaterAnimals the spawnLimitWaterAnimals to set + */ + public void setSpawnLimitWaterAnimals(int spawnLimitWaterAnimals) { + this.spawnLimitWaterAnimals = spawnLimitWaterAnimals; + } - @ConfigComment("What the plugin should reset when the player joins or creates a cave") - @ConfigComment("Reset Money - if this is true, will reset the player's money to the starting money") - @ConfigComment("Recommendation is that this is set to true, but if you run multi-worlds") - @ConfigComment("make sure your economy handles multi-worlds too.") - @ConfigEntry(path = "cave.reset.on-join.money") - private boolean onJoinResetMoney = false; + /** + * @return the spawnLimitAmbient + */ + public int getSpawnLimitAmbient() { + return spawnLimitAmbient; + } - @ConfigComment("Reset inventory - if true, the player's inventory will be cleared.") - @ConfigComment("Note: if you have MultiInv running or a similar inventory control plugin, that") - @ConfigComment("plugin may still reset the inventory when the world changes.") - @ConfigEntry(path = "cave.reset.on-join.inventory") - private boolean onJoinResetInventory = false; + /** + * @param spawnLimitAmbient the spawnLimitAmbient to set + */ + public void setSpawnLimitAmbient(int spawnLimitAmbient) { + this.spawnLimitAmbient = spawnLimitAmbient; + } - @ConfigComment("Reset health - if true, the player's health will be reset.") - @ConfigEntry(path = "cave.reset.on-join.health") - private boolean onJoinResetHealth = true; + /** + * @return the ticksPerAnimalSpawns + */ + public int getTicksPerAnimalSpawns() { + return ticksPerAnimalSpawns; + } - @ConfigComment("Reset hunger - if true, the player's hunger will be reset.") - @ConfigEntry(path = "cave.reset.on-join.hunger") - private boolean onJoinResetHunger = true; + /** + * @param ticksPerAnimalSpawns the ticksPerAnimalSpawns to set + */ + public void setTicksPerAnimalSpawns(int ticksPerAnimalSpawns) { + this.ticksPerAnimalSpawns = ticksPerAnimalSpawns; + } - @ConfigComment("Reset experience points - if true, the player's experience will be reset.") - @ConfigEntry(path = "cave.reset.on-join.exp") - private boolean onJoinResetXP = false; + /** + * @return the ticksPerMonsterSpawns + */ + public int getTicksPerMonsterSpawns() { + return ticksPerMonsterSpawns; + } - @ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.") - @ConfigEntry(path = "cave.reset.on-join.ender-chest") - private boolean onJoinResetEnderChest = false; + /** + * @param ticksPerMonsterSpawns the ticksPerMonsterSpawns to set + */ + public void setTicksPerMonsterSpawns(int ticksPerMonsterSpawns) { + this.ticksPerMonsterSpawns = ticksPerMonsterSpawns; + } - @ConfigComment("What the plugin should reset when the player leaves or is kicked from a cave") - @ConfigComment("Reset Money - if this is true, will reset the player's money to the starting money") - @ConfigComment("Recommendation is that this is set to true, but if you run multi-worlds") - @ConfigComment("make sure your economy handles multi-worlds too.") - @ConfigEntry(path = "cave.reset.on-leave.money") - private boolean onLeaveResetMoney = false; + /* (non-Javadoc) + * @see world.bentobox.bentobox.api.configuration.WorldSettings#isCheckForBlocks() + */ + @Override + public boolean isCheckForBlocks() { + // Do not check for blocks when looking for new island spots + return false; + } - @ConfigComment("Reset inventory - if true, the player's inventory will be cleared.") - @ConfigComment("Note: if you have MultiInv running or a similar inventory control plugin, that") - @ConfigComment("plugin may still reset the inventory when the world changes.") - @ConfigEntry(path = "cave.reset.on-leave.inventory") - private boolean onLeaveResetInventory = false; - @ConfigComment("Reset health - if true, the player's health will be reset.") - @ConfigEntry(path = "cave.reset.on-leave.health") - private boolean onLeaveResetHealth = false; + /** + * Sets make nether portals. + * + * @param makeNetherPortals the make nether portals + */ + public void setMakeNetherPortals(boolean makeNetherPortals) + { + this.makeNetherPortals = makeNetherPortals; + } - @ConfigComment("Reset hunger - if true, the player's hunger will be reset.") - @ConfigEntry(path = "cave.reset.on-leave.hunger") - private boolean onLeaveResetHunger = false; - @ConfigComment("Reset experience - if true, the player's experience will be reset.") - @ConfigEntry(path = "cave.reset.on-leave.exp") - private boolean onLeaveResetXP = false; + /** + * Sets make end portals. + * + * @param makeEndPortals the make end portals + */ + public void setMakeEndPortals(boolean makeEndPortals) + { + this.makeEndPortals = makeEndPortals; + } - @ConfigComment("Reset Ender Chest - if true, the player's Ender Chest will be cleared.") - @ConfigEntry(path = "cave.reset.on-leave.ender-chest") - private boolean onLeaveResetEnderChest = false; - @ConfigComment("Toggles the automatic cave creation upon the player's first login on your server.") - @ConfigComment("If set to true,") - @ConfigComment(" * Upon connecting to your server for the first time, the player will be told that") - @ConfigComment(" a cave will be created for him.") - @ConfigComment(" * Make sure you have a Blueprint Bundle called \"default\": this is the one that will") - @ConfigComment(" be used to create the cave.") - @ConfigComment(" * A cave will be created for the player without needing him to run the create command.") - @ConfigComment("If set to false, this will disable this feature entirely.") - @ConfigComment("Warning:") - @ConfigComment(" * If you are running multiple gamemodes on your server, and all of them have") - @ConfigComment(" this feature enabled, a cave in all the gamemodes will be created simultaneously.") - @ConfigComment(" However, it is impossible to know on which cave the player will be teleported to afterwards.") - @ConfigComment(" * Cave creation can be resource-intensive, please consider the options below to help mitigate") - @ConfigComment(" the potential issues, especially if you expect a lot of players to connect to your server") - @ConfigComment(" in a limited period of time.") - @ConfigEntry(path = "cave.create-cave-on-first-login.enable") - private boolean createIslandOnFirstLoginEnabled; + /** + * Sets on respawn commands. + * + * @param onRespawnCommands the on respawn commands + */ + public void setOnRespawnCommands(List onRespawnCommands) + { + this.onRespawnCommands = onRespawnCommands; + } - @ConfigComment("Time in seconds after the player logged in, before his cave gets created.") - @ConfigComment("If set to 0 or less, the cave will be created directly upon the player's login.") - @ConfigComment("It is recommended to keep this value under a minute's time.") - @ConfigEntry(path = "cave.create-cave-on-first-login.delay") - private int createIslandOnFirstLoginDelay = 5; - @ConfigComment("Toggles whether the cave creation should be aborted if the player logged off while the") - @ConfigComment("delay (see the option above) has not worn off yet.") - @ConfigComment("If set to true,") - @ConfigComment(" * If the player has logged off the server while the delay (see the option above) has not") - @ConfigComment(" worn off yet, this will cancel the cave creation.") - @ConfigComment(" * If the player relogs afterward, since he will not be recognized as a new player, no cave") - @ConfigComment(" would be created for him.") - @ConfigComment(" * If the cave creation started before the player logged off, it will continue.") - @ConfigComment("If set to false, the player's cave will be created even if he went offline in the meantime.") - @ConfigComment("Note this option has no effect if the delay (see the option above) is set to 0 or less.") - @ConfigEntry(path = "cave.create-cave-on-first-login.abort-on-logout") - private boolean createIslandOnFirstLoginAbortOnLogout = true; + /** + * Is generate caves boolean. + * + * @return the boolean + */ + public boolean isGenerateCaves() + { + return generateCaves; + } - @ConfigComment("Toggles whether the player should be teleported automatically to his cave when it is created.") - @ConfigComment("If set to false, the player will be told his cave is ready but will have to teleport to his cave using the command.") - @ConfigEntry(path = "cave.teleport-player-to-cave-when-created", since = "1.10.0") - private boolean teleportPlayerToIslandUponIslandCreation = true; - @ConfigComment("Create Nether or End cave if they are missing when a player goes through a portal.") - @ConfigComment("Nether and End cave are usually pasted when a player makes their cave, but if they are") - @ConfigComment("missing for some reason, you can switch this on.") - @ConfigComment("Note that bedrock removal glitches can exploit this option.") - @ConfigEntry(path = "cave.create-missing-nether-end-caves", since = "1.10.0") - private boolean pasteMissingIslands = false; + /** + * Sets generate caves. + * + * @param generateCaves the generate caves + */ + public void setGenerateCaves(boolean generateCaves) + { + this.generateCaves = generateCaves; + } - // Commands - @ConfigComment("List of commands to run when a player joins an cave or creates one.") - @ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,") - @ConfigComment("in which case they are executed by the player.") - @ConfigComment("") - @ConfigComment("Available placeholders for the commands are the following:") - @ConfigComment(" * [name]: name of the player") - @ConfigComment("") - @ConfigComment("Here are some examples of valid commands to execute:") - @ConfigComment(" * '[SUDO] bbox version'") - @ConfigComment(" * 'bsbadmin deaths set [player] 0'") - @ConfigComment("") - @ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.") - @ConfigEntry(path = "cave.commands.on-join", since = "1.8.0") - private List onJoinCommands = new ArrayList<>(); - @ConfigComment("List of commands to run when a player leaves a cave, resets his cave or gets kicked from it.") - @ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,") - @ConfigComment("in which case they are executed by the player.") - @ConfigComment("") - @ConfigComment("Available placeholders for the commands are the following:") - @ConfigComment(" * [name]: name of the player") - @ConfigComment("") - @ConfigComment("Here are some examples of valid commands to execute:") - @ConfigComment(" * '[SUDO] bbox version'") - @ConfigComment(" * 'bsbadmin deaths set [player] 0'") - @ConfigComment("") - @ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.") - @ConfigEntry(path = "cave.commands.on-leave", since = "1.8.0") - private List onLeaveCommands = new ArrayList<>(); + /** + * Is generate natural bedrock boolean. + * + * @return the boolean + */ + public boolean isGenerateNaturalBedrock() + { + return generateNaturalBedrock; + } - @ConfigComment("List of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true.") - @ConfigComment("These commands are run by the console, unless otherwise stated using the [SUDO] prefix,") - @ConfigComment("in which case they are executed by the player.") - @ConfigComment("") - @ConfigComment("Available placeholders for the commands are the following:") - @ConfigComment(" * [name]: name of the player") - @ConfigComment("") - @ConfigComment("Here are some examples of valid commands to execute:") - @ConfigComment(" * '[SUDO] bbox version'") - @ConfigComment(" * 'bsbadmin deaths set [player] 0'") - @ConfigComment("") - @ConfigComment("Note that player-executed commands might not work, as these commands can be run with said player being offline.") - @ConfigEntry(path = "cave.commands.on-respawn", since = "1.14.0") - private List onRespawnCommands = new ArrayList<>(); - // Sethome - @ConfigComment("Allow setting home in the nether. Only available on nether islands, not vanilla nether.") - @ConfigEntry(path = "cave.sethome.nether.allow") - private boolean allowSetHomeInNether = true; + /** + * Sets generate natural bedrock. + * + * @param generateNaturalBedrock the generate natural bedrock + */ + public void setGenerateNaturalBedrock(boolean generateNaturalBedrock) + { + this.generateNaturalBedrock = generateNaturalBedrock; + } - @ConfigEntry(path = "cave.sethome.nether.require-confirmation") - private boolean requireConfirmationToSetHomeInNether = true; - @ConfigComment("Allow setting home in the end. Only available on end islands, not vanilla end.") - @ConfigEntry(path = "cave.sethome.the-end.allow") - private boolean allowSetHomeInTheEnd = true; + /** + * Is generate natural surface boolean. + * + * @return the boolean + */ + public boolean isGenerateNaturalSurface() + { + return generateNaturalSurface; + } - @ConfigEntry(path = "cave.sethome.the-end.require-confirmation") - private boolean requireConfirmationToSetHomeInTheEnd = true; - // Deaths - @ConfigComment("Whether deaths are counted or not.") - @ConfigEntry(path = "cave.deaths.counted") - private boolean deathsCounted = true; + /** + * Sets generate natural surface. + * + * @param generateNaturalSurface the generate natural surface + */ + public void setGenerateNaturalSurface(boolean generateNaturalSurface) + { + this.generateNaturalSurface = generateNaturalSurface; + } - @ConfigComment("Maximum number of deaths to count. The death count can be used by add-ons.") - @ConfigEntry(path = "cave.deaths.max") - private int deathsMax = 10; - @ConfigComment("Reset player death count when they start a new cave or reset a cave") - @ConfigEntry(path = "cave.deaths.reset-on-new") - private boolean deathsResetOnNewIsland = true; + @Override + public Map getDefaultIslandFlags() + { + return Collections.emptyMap(); + } - @ConfigComment("When a player joins a team, reset their death count") - @ConfigEntry(path = "cave.deaths.team-join-reset") - private boolean teamJoinDeathReset = true; - // --------------------------------------------- - /* PROTECTION */ + @Override + public Map getDefaultIslandSettings() + { + return Collections.emptyMap(); + } - @ConfigComment("Geo restrict mobs.") - @ConfigComment("Mobs that exit the cave space where they were spawned will be removed.") - @ConfigEntry(path = "protection.geo-limit-settings") - private List geoLimitSettings = new ArrayList<>(); + /** + * @return the disallowTeamMemberIslands + */ + @Override + public boolean isDisallowTeamMemberIslands() { + return disallowTeamMemberIslands; + } - @ConfigComment("CaveBlock blocked mobs.") - @ConfigComment("List of mobs that should not spawn in the CaveBlock.") - @ConfigEntry(path = "protection.block-mobs", since = "1.13.0") - private List mobLimitSettings = new ArrayList<>(); + /** + * @param disallowTeamMemberIslands the disallowTeamMemberIslands to set + */ + public void setDisallowTeamMemberIslands(boolean disallowTeamMemberIslands) { + this.disallowTeamMemberIslands = disallowTeamMemberIslands; + } - // Invincible visitor settings - @ConfigComment("Invincible visitors. List of damages that will not affect visitors.") - @ConfigComment("Make list blank if visitors should receive all damages") - @ConfigEntry(path = "protection.invincible-visitors") - private List ivSettings = new ArrayList<>(); + /** + * @return the concurrentIslands + */ + @Override + public int getConcurrentIslands() { + if (concurrentIslands <= 0) { + return BentoBox.getInstance().getSettings().getIslandNumber(); + } + return concurrentIslands; + } - //---------------------------------------------------------------------------------------/ - @ConfigComment("These settings should not be edited") - @ConfigEntry(path = "do-not-edit-these-settings.reset-epoch") - private long resetEpoch = 0; - private boolean debug; + /** + * @param concurrentIslands the concurrentIslands to set + */ + public void setConcurrentIslands(int concurrentIslands) { + this.concurrentIslands = concurrentIslands; + } } diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index d1a8bfe..6d89523 100644 --- a/src/main/resources/addon.yml +++ b/src/main/resources/addon.yml @@ -1,7 +1,7 @@ name: CaveBlock main: world.bentobox.caveblock.CaveBlock version: ${version}${build.number} -api-version: 1.23.0 +api-version: 2.5.0 metrics: true repository: "BentoBoxWorld/CaveBlock" icon: "STONE_PICKAXE" From 0513f71d318b2e661d76a2e3d7220d5e4302d9b3 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 17 Aug 2024 10:35:03 -0700 Subject: [PATCH 11/11] Update config.yml --- src/main/resources/config.yml | 254 ++++++++++++---------------------- 1 file changed, 90 insertions(+), 164 deletions(-) diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 6dd742c..25d5d16 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,4 +1,4 @@ -# CaveBlock Configuration 1.15.0-SNAPSHOT-LOCAL +# CaveBlock Configuration ${version} caveblock: command: # Cave Command. What command users will run to access their cave. @@ -72,6 +72,11 @@ world: # Maximum number of caves in the world. Set to -1 or 0 for unlimited. # If the number of caves is greater than this number, it will stop players from creating caves. max-caves: 0 + # The number of concurrent caves a player can have + # A value of 0 will use the BentoBox config.yml default + concurrent-caves: 0 + # Disallow team members from having their own caves. + disallow-team-member-caves: true # The default game mode for this world. Players will be set to this mode when they create # a new cave for example. Options are SURVIVAL, CREATIVE, ADVENTURE, SPECTATOR default-game-mode: SURVIVAL @@ -81,7 +86,7 @@ world: # The permission caveblock.ban.maxlimit.X where X is a number can also be used per player # -1 = unlimited ban-limit: -1 - # + # # This is cave.. no height... only depth. If depth is set smaller than maximal world height, then area above will be empty. # Should not be less than cave height. # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. @@ -95,18 +100,18 @@ world: # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. use-new-material-generator: false normal: - # + # # Make over world roof of bedrock, if false, it will be made from stone. # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. roof: true - # + # # Option allows to toggle if world generator should generate natural(-ish) looking surface with dirt and grass blocks. # Enabling this option will ignore roof setting. # Default value is false. # /!\ This feature is experimental and might not work as expected or might not work at all. # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. natural-surface: false - # + # # Option allows to toggle if world generator should generate natural looking caves. # Default value is false. # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. @@ -114,7 +119,7 @@ world: # Make over world floor of bedrock, if false, it will be made from stone. # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. floor: true - # + # # Option allows to toggle if world generator should generate natural looking bedrock block patterns. # Enabling this option will ignore floor setting. # Default value is false. @@ -134,24 +139,24 @@ world: # where max amount in pack are 5 per each subchunk! # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. blocks: - - MATERIAL:DIAMOND_ORE:1:5 - - MATERIAL:GOLD_ORE:1:4 - - MATERIAL:IRON_ORE:5:4 - - MATERIAL:COAL_ORE:10:6 - - MATERIAL:EMERALD_ORE:1:1 - - MATERIAL:CLAY:10:6 - - MATERIAL:DIRT:20:10 - - MATERIAL:GRAVEL:40:6 - - MATERIAL:GRANITE:40:10 - - MATERIAL:ANDESITE:20:10 - - MATERIAL:DIORITE:30:8 - - ENTITY:ZOMBIE:10:1 - - ENTITY:ENDERMAN:10:1 - - ENTITY:SKELETON:10:1 - - ENTITY:CREEPER:1:1 - - ENTITY:DOLPHIN:1:1 - - ENTITY:BAT:10:1 - - ENTITY:CAVE_SPIDER:10:1 + - MATERIAL:DIAMOND_ORE:1:5 + - MATERIAL:GOLD_ORE:1:4 + - MATERIAL:IRON_ORE:5:4 + - MATERIAL:COAL_ORE:10:6 + - MATERIAL:EMERALD_ORE:1:1 + - MATERIAL:CLAY:10:6 + - MATERIAL:DIRT:20:10 + - MATERIAL:GRAVEL:40:6 + - MATERIAL:GRANITE:40:10 + - MATERIAL:ANDESITE:20:10 + - MATERIAL:DIORITE:30:8 + - ENTITY:ZOMBIE:10:1 + - ENTITY:ENDERMAN:10:1 + - ENTITY:SKELETON:10:1 + - ENTITY:CREEPER:1:1 + - ENTITY:DOLPHIN:1:1 + - ENTITY:BAT:10:1 + - ENTITY:CAVE_SPIDER:10:1 nether: # Generate Nether - if this is false, the nether world will not be made and access to # the nether will not occur. Other plugins may still enable portal usage. @@ -190,16 +195,16 @@ world: # where max amount in pack are 5 per each subchunk! # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. blocks: - - MATERIAL:NETHER_QUARTZ_ORE:30:5 - - MATERIAL:SOUL_SAND:40:10 - - MATERIAL:MAGMA_BLOCK:10:3 - - MATERIAL:GLOWSTONE:20:8 - - MATERIAL:NETHER_BRICKS:10:5 - - MATERIAL:LAVA:10:1 - - ENTITY:MAGMA_CUBE:0.5:1 - - ENTITY:GHAST:0.1:1 - - ENTITY:WITHER_SKELETON:0.1:1 - - MATERIAL:FIRE:10:1 + - MATERIAL:NETHER_QUARTZ_ORE:30:5 + - MATERIAL:SOUL_SAND:40:10 + - MATERIAL:MAGMA_BLOCK:10:3 + - MATERIAL:GLOWSTONE:20:8 + - MATERIAL:NETHER_BRICKS:10:5 + - MATERIAL:LAVA:10:1 + - ENTITY:MAGMA_CUBE:0.5:1 + - ENTITY:GHAST:0.1:1 + - ENTITY:WITHER_SKELETON:0.1:1 + - MATERIAL:FIRE:10:1 # This option indicates if nether portals should be linked via dimensions. # Option will simulate vanilla portal mechanics that links portals together # or creates a new portal, if there is not a portal in that dimension. @@ -233,17 +238,17 @@ world: # where max amount in pack are 5 per each subchunk! # /!\ BentoBox currently does not support changing this value mid-game. If you do need to change it, do a full reset of your databases and worlds. blocks: - - ENTITY:SHULKER:0.2:1 - - MATERIAL:OBSIDIAN:1:1 - - MATERIAL:CHORUS_PLANT:1:3 + - ENTITY:SHULKER:0.2:1 + - MATERIAL:OBSIDIAN:1:1 + - MATERIAL:CHORUS_PLANT:1:3 # This option indicates if obsidian platform in the end should be generated # when player enters the end world. create-obsidian-platform: false # Mob white list - these mobs will NOT be removed when logging in or doing /cave remove-mobs-whitelist: - - ZOMBIE_VILLAGER - - WITHER - - ENDERMAN + - WITHER + - ENDERMAN + - ZOMBIE_VILLAGER # World flags. These are boolean settings for various flags for this world flags: CREEPER_DAMAGE: true @@ -278,112 +283,33 @@ world: # MEMBER = 500 # SUB-OWNER = 900 # OWNER = 1000 - default-cave-flags: - HURT_ANIMALS: 500 - DRAGON_EGG: 500 - REDSTONE: 500 - BUCKET: 500 - LOCK: 0 - ENDER_PEARL: 500 - DOOR: 500 - BREAK_HOPPERS: 500 - FURNACE: 500 - ANVIL: 500 - MINECART: 500 - FISH_SCOOPING: 500 - END_PORTAL: 500 - BREEDING: 500 - HURT_VILLAGERS: 500 - FROST_WALKER: 500 - TURTLE_EGGS: 500 - COLLECT_LAVA: 500 - BREAK_SPAWNERS: 500 - LEVER: 500 - ELYTRA: 0 - CAKE: 500 - RIDING: 500 - HURT_MONSTERS: 0 - NAME_TAG: 500 - ARMOR_STAND: 500 - TRADING: 0 - EGGS: 500 - ITEM_DROP: 0 - NOTE_BLOCK: 0 - FLINT_AND_STEEL: 500 - NETHER_PORTAL: 500 - LECTERN: 500 - CROP_TRAMPLE: 500 - ITEM_PICKUP: 0 - BREWING: 500 - DROPPER: 500 - TNT_PRIMING: 500 - COLLECT_WATER: 500 - BUTTON: 500 - FIRE_EXTINGUISH: 500 - COMMAND_RANKS: 500 - BEACON: 500 - TRAPDOOR: 500 - PRESSURE_PLATE: 0 - EXPERIENCE_BOTTLE_THROWING: 500 - DYE: 500 - ITEM_FRAME: 500 - PLACE_BLOCKS: 500 - CRAFTING: 0 - SHEARING: 500 - ENCHANTING: 0 - BOAT: 500 - SPAWN_EGGS: 500 - BED: 500 - MILKING: 0 - DISPENSER: 500 - GATE: 0 - EXPERIENCE_PICKUP: 500 - HOPPER: 500 - LEASH: 500 - MOUNT_INVENTORY: 500 - BREAK_BLOCKS: 500 - CHORUS_FRUIT: 500 - CONTAINER: 500 - JUKEBOX: 500 - POTION_THROWING: 500 + default-cave-flags: {} # These are the default settings for new caves - default-cave-settings: - PVP_END: false - PVP_NETHER: false - LEAF_DECAY: true - MONSTER_SPAWNERS_SPAWN: true - TNT_DAMAGE: true - ANIMAL_NATURAL_SPAWN: true - MONSTER_NATURAL_SPAWN: true - FIRE_IGNITE: true - FIRE_SPREAD: true - FIRE_BURNING: true - ANIMAL_SPAWNERS_SPAWN: true - PVP_OVERWORLD: false + default-cave-settings: {} # These settings/flags are hidden from users # Ops can toggle hiding in-game using SHIFT-LEFT-CLICK on flags in settings hidden-flags: [] # Visitor banned commands - Visitors to caves cannot use these commands in this world visitor-banned-commands: - - spawner - - spawnmob + - spawner + - spawnmob # Falling banned commands - players cannot use these commands when falling # if the PREVENT_TELEPORT_WHEN_FALLING world setting flag is active falling-banned-commands: - - warp - - spawn + - warp + - spawn cave: # Default max team size - # Permission size cannot be less than the default below. + # Permission size cannot be less than the default below. max-team-size: 4 # Default maximum number of coop rank members per cave # Players can have the caveblock.coop.maxsize. permission to be bigger but - # permission size cannot be less than the default below. + # permission size cannot be less than the default below. # Added since 1.13.0. max-coop-size: 4 # Default maximum number of trusted rank members per cave # Players can have the caveblock.trust.maxsize. permission to be bigger but - # permission size cannot be less than the default below. + # permission size cannot be less than the default below. # Added since 1.13.0. max-trusted-size: 4 # Default maximum number of homes a player can have. Min = 1 @@ -485,42 +411,42 @@ cave: # List of commands to run when a player joins an cave or creates one. # These commands are run by the console, unless otherwise stated using the [SUDO] prefix, # in which case they are executed by the player. - # + # # Available placeholders for the commands are the following: # * [name]: name of the player - # + # # Here are some examples of valid commands to execute: # * '[SUDO] bbox version' # * 'bsbadmin deaths set [player] 0' - # + # # Note that player-executed commands might not work, as these commands can be run with said player being offline. # Added since 1.8.0. on-join: [] # List of commands to run when a player leaves a cave, resets his cave or gets kicked from it. # These commands are run by the console, unless otherwise stated using the [SUDO] prefix, # in which case they are executed by the player. - # + # # Available placeholders for the commands are the following: # * [name]: name of the player - # + # # Here are some examples of valid commands to execute: # * '[SUDO] bbox version' # * 'bsbadmin deaths set [player] 0' - # + # # Note that player-executed commands might not work, as these commands can be run with said player being offline. # Added since 1.8.0. on-leave: [] # List of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true. # These commands are run by the console, unless otherwise stated using the [SUDO] prefix, # in which case they are executed by the player. - # + # # Available placeholders for the commands are the following: # * [name]: name of the player - # + # # Here are some examples of valid commands to execute: # * '[SUDO] bbox version' # * 'bsbadmin deaths set [player] 0' - # + # # Note that player-executed commands might not work, as these commands can be run with said player being offline. # Added since 1.14.0. on-respawn: [] @@ -546,9 +472,9 @@ protection: # Geo restrict mobs. # Mobs that exit the cave space where they were spawned will be removed. geo-limit-settings: - - GHAST - - BAT - - BLAZE + - GHAST + - BAT + - BLAZE # CaveBlock blocked mobs. # List of mobs that should not spawn in the CaveBlock. # Added since 1.13.0. @@ -556,30 +482,30 @@ protection: # Invincible visitors. List of damages that will not affect visitors. # Make list blank if visitors should receive all damages invincible-visitors: - - BLOCK_EXPLOSION - - CONTACT - - CUSTOM - - DROWNING - - ENTITY_ATTACK - - ENTITY_EXPLOSION - - FALL - - FALLING_BLOCK - - FIRE - - FIRE_TICK - - LAVA - - LIGHTNING - - MAGIC - - POISON - - PROJECTILE - - STARVATION - - SUFFOCATION - - THORNS - - WITHER - - DRAGON_BREATH - - FLY_INTO_WALL - - HOT_FLOOR - - CRAMMING - - VOID + - BLOCK_EXPLOSION + - CONTACT + - CUSTOM + - DROWNING + - ENTITY_ATTACK + - ENTITY_EXPLOSION + - FALL + - FALLING_BLOCK + - FIRE + - FIRE_TICK + - LAVA + - LIGHTNING + - MAGIC + - POISON + - PROJECTILE + - STARVATION + - SUFFOCATION + - THORNS + - WITHER + - DRAGON_BREATH + - FLY_INTO_WALL + - HOT_FLOOR + - CRAMMING + - VOID do-not-edit-these-settings: # These settings should not be edited reset-epoch: 0