Added setting to switch on/off pasting of missing nether/end islands

https://github.com/BentoBoxWorld/BentoBox/issues/1063
This commit is contained in:
tastybento 2019-12-15 16:26:43 -08:00
parent 91d4988bfb
commit 886cadb141
2 changed files with 27 additions and 0 deletions

View File

@ -392,6 +392,13 @@ public class AISettings implements WorldSettings {
@ConfigEntry(path = "island.create-island-on-first-login.abort-on-logout") @ConfigEntry(path = "island.create-island-on-first-login.abort-on-logout")
private boolean createIslandOnFirstLoginAbortOnLogout = true; private boolean createIslandOnFirstLoginAbortOnLogout = true;
@ConfigComment("Create Nether or End islands if they are missing when a player goes through a portal.")
@ConfigComment("Nether and End islands are usually pasted when a player makes their island, 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 = "island.create-missing-nether-end-islands")
private boolean pasteMissingIslands = false;
// 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")
@ -1507,4 +1514,19 @@ public class AISettings implements WorldSettings {
{ {
this.createIslandOnFirstLoginAbortOnLogout = createIslandOnFirstLoginAbortOnLogout; this.createIslandOnFirstLoginAbortOnLogout = createIslandOnFirstLoginAbortOnLogout;
} }
/**
* @return the pasteMissingIslands
*/
@Override
public boolean isPasteMissingIslands() {
return pasteMissingIslands;
}
/**
* @param pasteMissingIslands the pasteMissingIslands to set
*/
public void setPasteMissingIslands(boolean pasteMissingIslands) {
this.pasteMissingIslands = pasteMissingIslands;
}
} }

View File

@ -338,6 +338,11 @@ island:
# If set to false, the player's island will be created even if he went offline in the meantime. # 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. # Note this option has no effect if the delay (see the option above) is set to 0 or less.
abort-on-logout: true abort-on-logout: true
# Create Nether or End islands if they are missing when a player goes through a portal.
# Nether and End islands are usually pasted when a player makes their island, but if they are
# missing for some reason, you can switch this on.
# Note that bedrock removal glitches can exploit this option.
create-missing-nether-end-islands: false
commands: commands:
# List of commands to run when a player joins. # List of commands to run when a player joins.
on-join: [] on-join: []