diff --git a/pom.xml b/pom.xml
index 589f161..f476023 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,11 +46,11 @@
1.8
1.14.4-R0.1-SNAPSHOT
- 1.8.0
+ 1.9.0-SNAPSHOT
${build.version}-SNAPSHOT
- 1.8.0
+ 1.9.0
-LOCAL
diff --git a/src/main/java/world/bentobox/caveblock/Settings.java b/src/main/java/world/bentobox/caveblock/Settings.java
index 745add6..9b4a7a6 100644
--- a/src/main/java/world/bentobox/caveblock/Settings.java
+++ b/src/main/java/world/bentobox/caveblock/Settings.java
@@ -354,6 +354,19 @@ public class Settings implements WorldSettings
}
+ /**
+ * 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.
@@ -400,7 +413,7 @@ public class Settings implements WorldSettings
/**
* This method returns the kickedKeepInventory object.
- * @return the kickedKeepInventory object.
+ * @return the kickedKeepInventory value.
*/
@Override
public boolean isKickedKeepInventory()
@@ -409,6 +422,42 @@ public class Settings implements WorldSettings
}
+ /**
+ * This method returns the createIslandOnFirstLoginEnabled boolean value.
+ * @return the createIslandOnFirstLoginEnabled value
+ * @since 1.9.0
+ */
+ @Override
+ public boolean isCreateIslandOnFirstLoginEnabled()
+ {
+ return this.createCaveOnFirstLoginEnabled;
+ }
+
+
+ /**
+ * This method returns the createIslandOnFirstLoginDelay integer value.
+ * @return the createIslandOnFirstLoginDelay value
+ * @since 1.9.0
+ */
+ @Override
+ public int getCreateIslandOnFirstLoginDelay()
+ {
+ return this.createCaveOnFirstLoginDelay;
+ }
+
+
+ /**
+ * This method returns the createIslandOnFirstLoginAbortOnLogout boolean value.
+ * @return the createIslandOnFirstLoginAbortOnLogout value
+ * @since 1.9.0
+ */
+ @Override
+ public boolean isCreateIslandOnFirstLoginAbortOnLogout()
+ {
+ return this.createCaveOnFirstLoginAbortOnLogout;
+ }
+
+
/**
* This method returns the onJoinResetMoney object.
* @return the onJoinResetMoney object.
@@ -1868,6 +1917,11 @@ public class Settings implements WorldSettings
@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<>();
+
// ---------------------------------------------
/* ISLAND */
@@ -1959,6 +2013,43 @@ public class Settings implements WorldSettings
@ConfigEntry(path = "island.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 = "island.create-cave-on-first-login.enable")
+ private boolean createCaveOnFirstLoginEnabled;
+
+ @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 = "island.create-cave-on-first-login.delay")
+ private int createCaveOnFirstLoginDelay = 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 = "island.create-cave-on-first-login.abort-on-logout")
+ private boolean createCaveOnFirstLoginAbortOnLogout = true;
+
// Commands
@ConfigComment("List of commands to run when a player joins.")
@ConfigEntry(path = "island.commands.on-join")
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index 9e0635b..ae5c355 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -270,6 +270,11 @@ world:
visitor-banned-commands:
- 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
island:
# Default max team size
# Permission size cannot be less than the default below.
@@ -327,6 +332,38 @@ island:
exp: false
# Reset Ender Chest - if true, the player's Ender Chest will be cleared.
ender-chest: false
+ create-cave-on-first-login:
+ # Toggles the automatic cave creation upon the player's first login on your server.
+ # If set to true,
+ # * Upon connecting to your server for the first time, the player will be told that
+ # a cave will be created for him.
+ # * Make sure you have a Blueprint Bundle called "default": this is the one that will
+ # be used to create the cave.
+ # * A cave will be created for the player without needing him to run the create command.
+ # If set to false, this will disable this feature entirely.
+ # Warning:
+ # * If you are running multiple gamemodes on your server, and all of them have
+ # this feature enabled, a cave in all the gamemodes will be created simultaneously.
+ # However, it is impossible to know on which cave the player will be teleported to afterwards.
+ # * Cave creation can be resource-intensive, please consider the options below to help mitigate
+ # the potential issues, especially if you expect a lot of players to connect to your server
+ # in a limited period of time.
+ enable: false
+ # Time in seconds after the player logged in, before his cave gets created.
+ # If set to 0 or less, the cave will be created directly upon the player's login.
+ # It is recommended to keep this value under a minute's time.
+ delay: 5
+ # Toggles whether the cave creation should be aborted if the player logged off while the
+ # delay (see the option above) has not worn off yet.
+ # If set to true,
+ # * If the player has logged off the server while the delay (see the option above) has not
+ # worn off yet, this will cancel the cave creation.
+ # * If the player relogs afterward, since he will not be recognized as a new player, no cave
+ # would be created for him.
+ # * If the cave creation started before the player logged off, it will continue.
+ # If set to false, the player's cave will be created even if he went offline in the meantime.
+ # Note this option has no effect if the delay (see the option above) is set to 0 or less.
+ abort-on-logout: true
commands:
# List of commands to run when a player joins.
on-join: []