mirror of
https://github.com/BentoBoxWorld/BSkyBlock.git
synced 2024-12-28 17:27:35 +01:00
Update to latest BentoBox 1.9-SNAPSHOT API changes. (#214)
- Add createIslandOnFirstLoginEnabled - Add createIslandOnFirstLoginDelay - Add createIslandOnFirstLoginAbortOnLogout
This commit is contained in:
parent
7292e94afb
commit
b0c6499bf7
2
pom.xml
2
pom.xml
@ -59,7 +59,7 @@
|
|||||||
<powermock.version>2.0.2</powermock.version>
|
<powermock.version>2.0.2</powermock.version>
|
||||||
<!-- More visible way how to change dependency versions -->
|
<!-- More visible way how to change dependency versions -->
|
||||||
<spigot.version>1.14.4-R0.1-SNAPSHOT</spigot.version>
|
<spigot.version>1.14.4-R0.1-SNAPSHOT</spigot.version>
|
||||||
<bentobox.version>1.8.0</bentobox.version>
|
<bentobox.version>1.9.0-SNAPSHOT</bentobox.version>
|
||||||
<!-- Revision variable removes warning about dynamic version -->
|
<!-- Revision variable removes warning about dynamic version -->
|
||||||
<revision>${build.version}-SNAPSHOT</revision>
|
<revision>${build.version}-SNAPSHOT</revision>
|
||||||
<!-- Do not change unless you want different name for local builds. -->
|
<!-- Do not change unless you want different name for local builds. -->
|
||||||
|
@ -290,6 +290,43 @@ public class Settings implements WorldSettings {
|
|||||||
@ConfigEntry(path = "island.reset.on-leave.ender-chest")
|
@ConfigEntry(path = "island.reset.on-leave.ender-chest")
|
||||||
private boolean onLeaveResetEnderChest = false;
|
private boolean onLeaveResetEnderChest = false;
|
||||||
|
|
||||||
|
@ConfigComment("Toggles the automatic island 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(" an island 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 island.")
|
||||||
|
@ConfigComment(" * An island 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, an island in all the gamemodes will be created simultaneously.")
|
||||||
|
@ConfigComment(" However, it is impossible to know on which island the player will be teleported to afterwards.")
|
||||||
|
@ConfigComment(" * Island 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-island-on-first-login.enable")
|
||||||
|
private boolean createIslandOnFirstLoginEnabled;
|
||||||
|
|
||||||
|
@ConfigComment("Time in seconds after the player logged in, before his island gets created.")
|
||||||
|
@ConfigComment("If set to 0 or less, the island 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-island-on-first-login.delay")
|
||||||
|
private int createIslandOnFirstLoginDelay = 5;
|
||||||
|
|
||||||
|
@ConfigComment("Toggles whether the island 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 island creation.")
|
||||||
|
@ConfigComment(" * If the player relogs afterward, since he will not be recognized as a new player, no island")
|
||||||
|
@ConfigComment(" would be created for him.")
|
||||||
|
@ConfigComment(" * If the island creation started before the player logged off, it will continue.")
|
||||||
|
@ConfigComment("If set to false, the player's island 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-island-on-first-login.abort-on-logout")
|
||||||
|
private boolean createIslandOnFirstLoginAbortOnLogout = true;
|
||||||
|
|
||||||
// Commands
|
// Commands
|
||||||
@ConfigComment("List of commands to run when a player joins.")
|
@ConfigComment("List of commands to run when a player joins.")
|
||||||
@ConfigEntry(path = "island.commands.on-join")
|
@ConfigEntry(path = "island.commands.on-join")
|
||||||
@ -611,6 +648,43 @@ public class Settings implements WorldSettings {
|
|||||||
return kickedKeepInventory;
|
return kickedKeepInventory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method returns the createIslandOnFirstLoginEnabled boolean value.
|
||||||
|
* @return the createIslandOnFirstLoginEnabled value
|
||||||
|
* @since 1.9.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean isCreateIslandOnFirstLoginEnabled()
|
||||||
|
{
|
||||||
|
return createIslandOnFirstLoginEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method returns the createIslandOnFirstLoginDelay int value.
|
||||||
|
* @return the createIslandOnFirstLoginDelay value
|
||||||
|
* @since 1.9.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int getCreateIslandOnFirstLoginDelay()
|
||||||
|
{
|
||||||
|
return createIslandOnFirstLoginDelay;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method returns the createIslandOnFirstLoginAbortOnLogout boolean value.
|
||||||
|
* @return the createIslandOnFirstLoginAbortOnLogout value
|
||||||
|
* @since 1.9.0
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean isCreateIslandOnFirstLoginAbortOnLogout()
|
||||||
|
{
|
||||||
|
return createIslandOnFirstLoginAbortOnLogout;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the onJoinResetMoney
|
* @return the onJoinResetMoney
|
||||||
*/
|
*/
|
||||||
@ -1013,6 +1087,30 @@ public class Settings implements WorldSettings {
|
|||||||
this.onLeaveResetEnderChest = onLeaveResetEnderChest;
|
this.onLeaveResetEnderChest = onLeaveResetEnderChest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param createIslandOnFirstLoginEnabled the createIslandOnFirstLoginEnabled to set
|
||||||
|
*/
|
||||||
|
public void setCreateIslandOnFirstLoginEnabled(boolean createIslandOnFirstLoginEnabled)
|
||||||
|
{
|
||||||
|
this.createIslandOnFirstLoginEnabled = createIslandOnFirstLoginEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param createIslandOnFirstLoginDelay the createIslandOnFirstLoginDelay to set
|
||||||
|
*/
|
||||||
|
public void setCreateIslandOnFirstLoginDelay(int createIslandOnFirstLoginDelay)
|
||||||
|
{
|
||||||
|
this.createIslandOnFirstLoginDelay = createIslandOnFirstLoginDelay;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param createIslandOnFirstLoginAbortOnLogout the createIslandOnFirstLoginAbortOnLogout to set
|
||||||
|
*/
|
||||||
|
public void setCreateIslandOnFirstLoginAbortOnLogout(boolean createIslandOnFirstLoginAbortOnLogout)
|
||||||
|
{
|
||||||
|
this.createIslandOnFirstLoginAbortOnLogout = createIslandOnFirstLoginAbortOnLogout;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param deathsCounted the deathsCounted to set
|
* @param deathsCounted the deathsCounted to set
|
||||||
*/
|
*/
|
||||||
|
@ -252,6 +252,38 @@ island:
|
|||||||
exp: false
|
exp: false
|
||||||
# Reset Ender Chest - if true, the player's Ender Chest will be cleared.
|
# Reset Ender Chest - if true, the player's Ender Chest will be cleared.
|
||||||
ender-chest: false
|
ender-chest: false
|
||||||
|
create-island-on-first-login:
|
||||||
|
# Toggles the automatic island 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
|
||||||
|
# an island 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 island.
|
||||||
|
# * An island 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, an island in all the gamemodes will be created simultaneously.
|
||||||
|
# However, it is impossible to know on which island the player will be teleported to afterwards.
|
||||||
|
# * Island 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 island gets created.
|
||||||
|
# If set to 0 or less, the island 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 island 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 island creation.
|
||||||
|
# * If the player relogs afterward, since he will not be recognized as a new player, no island
|
||||||
|
# would be created for him.
|
||||||
|
# * If the island creation started before the player logged off, it will continue.
|
||||||
|
# If set to false, the player's island 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:
|
commands:
|
||||||
# List of commands to run when a player joins.
|
# List of commands to run when a player joins.
|
||||||
on-join: []
|
on-join: []
|
||||||
|
Loading…
Reference in New Issue
Block a user