diff --git a/pom.xml b/pom.xml
index cdc54ab..40cc26d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -50,7 +50,7 @@
${build.version}-SNAPSHOT
- 1.14.3
+ 1.14.4
-LOCAL
diff --git a/src/main/java/world/bentobox/caveblock/Settings.java b/src/main/java/world/bentobox/caveblock/Settings.java
index eb24894..2795e19 100644
--- a/src/main/java/world/bentobox/caveblock/Settings.java
+++ b/src/main/java/world/bentobox/caveblock/Settings.java
@@ -13,6 +13,7 @@ import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.block.Biome;
import org.bukkit.entity.EntityType;
+import org.eclipse.jdt.annotation.NonNull;
import com.google.common.base.Enums;
@@ -862,6 +863,36 @@ public class Settings implements WorldSettings
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isMakeNetherPortals()
+ {
+ return this.makeNetherPortals;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean isMakeEndPortals()
+ {
+ return this.makeEndPortals;
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public @NonNull List getOnRespawnCommands()
+ {
+ return this.onRespawnCommands;
+ }
+
+
// ---------------------------------------------------------------------
// Section: Setters
// ---------------------------------------------------------------------
@@ -2001,6 +2032,39 @@ public class Settings implements WorldSettings
}
+ /**
+ * Sets make nether portals.
+ *
+ * @param makeNetherPortals the make nether portals
+ */
+ public void setMakeNetherPortals(boolean makeNetherPortals)
+ {
+ this.makeNetherPortals = makeNetherPortals;
+ }
+
+
+ /**
+ * Sets make end portals.
+ *
+ * @param makeEndPortals the make end portals
+ */
+ public void setMakeEndPortals(boolean makeEndPortals)
+ {
+ this.makeEndPortals = makeEndPortals;
+ }
+
+
+ /**
+ * Sets on respawn commands.
+ *
+ * @param onRespawnCommands the on respawn commands
+ */
+ public void setOnRespawnCommands(List onRespawnCommands)
+ {
+ this.onRespawnCommands = onRespawnCommands;
+ }
+
+
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
@@ -2207,6 +2271,12 @@ public class Settings implements WorldSettings
@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;
+
// End
@ConfigEntry(path = "world.end.generate")
private boolean endGenerate = true;
@@ -2245,6 +2315,11 @@ public class Settings implements WorldSettings
@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;
+
// Other staff.
@ConfigComment("Mob white list - these mobs will NOT be removed when logging in or doing /cave")
@@ -2440,14 +2515,51 @@ public class Settings implements WorldSettings
private boolean pasteMissingIslands = false;
// Commands
- @ConfigComment("List of commands to run when a player joins.")
- @ConfigEntry(path = "cave.commands.on-join")
+ @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.")
- @ConfigEntry(path = "cave.commands.on-leave")
+ @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<>();
+
// Sethome
@ConfigComment("Allow setting home in the nether. Only available on nether islands, not vanilla nether.")
@ConfigEntry(path = "cave.sethome.nether.allow")
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index af2e17d..1da2b6e 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -181,6 +181,9 @@ world:
- 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 other dimension.
+ create-and-link-portals: false
end:
generate: true
# /!\ 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.
@@ -213,6 +216,8 @@ world:
- 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:
- WITHER
@@ -454,10 +459,12 @@ cave:
# Added since 1.10.0.
create-missing-nether-end-caves: false
commands:
- # List of commands to run when a player joins.
+ # List of commands to run when a player joins an cave or creates one.
on-join: []
- # list of commands to run when a player leaves.
+ # List of commands to run when a player leaves a cave, resets his cave or gets kicked from it.
on-leave: []
+ # Returns a list of commands that should be executed when the player respawns after death if Flags.ISLAND_RESPAWN is true.
+ on-respawn: []
sethome:
nether:
# Allow setting home in the nether. Only available on nether islands, not vanilla nether.