Config added for pasting missing end or nether islands, default false

Stops bedrock removal glitch. Admins who need this can set it to true.

https://github.com/BentoBoxWorld/BentoBox/issues/1063
This commit is contained in:
tastybento 2019-12-15 16:22:00 -08:00
parent ae511379fd
commit c019a5db0f
3 changed files with 76 additions and 49 deletions

View File

@ -59,13 +59,13 @@
<powermock.version>2.0.2</powermock.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.14.4-R0.1-SNAPSHOT</spigot.version>
<bentobox.version>1.9.0-SNAPSHOT</bentobox.version>
<bentobox.version>1.10.0-SNAPSHOT</bentobox.version>
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.9.0</build.version>
<build.version>1.10.0</build.version>
</properties>
<!-- Profiles will allow to automatically change build version. -->

View File

@ -327,6 +327,13 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "island.create-island-on-first-login.abort-on-logout")
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
@ConfigComment("List of commands to run when a player joins.")
@ConfigEntry(path = "island.commands.on-join")
@ -1398,4 +1405,19 @@ public class Settings implements WorldSettings {
this.onLeaveResetXP = onLeaveResetXP;
}
/**
* @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

@ -91,9 +91,9 @@ world:
# Mob white list - these mobs will NOT be removed when logging in or doing /island
remove-mobs-whitelist:
- PIG_ZOMBIE
- ZOMBIE_VILLAGER
- ENDERMAN
- WITHER
- ZOMBIE_VILLAGER
# World flags. These are boolean settings for various flags for this world
flags:
CREEPER_DAMAGE: true
@ -137,40 +137,40 @@ world:
FROST_WALKER: 500
COLLECT_LAVA: 500
LEVER: 500
HURT_MONSTERS: 0
RIDING: 500
ARMOR_STAND: 500
HURT_MONSTERS: 0
NAME_TAG: 500
ARMOR_STAND: 500
TRADING: 0
EGGS: 500
ITEM_DROP: 0
NOTE_BLOCK: 0
NETHER_PORTAL: 500
CROP_TRAMPLE: 500
ITEM_PICKUP: 0
BREWING: 500
CROP_TRAMPLE: 500
DROPPER: 500
BREWING: 500
COLLECT_WATER: 500
BUTTON: 500
FIRE_EXTINGUISH: 500
BEACON: 500
TRAPDOOR: 500
PRESSURE_PLATE: 0
PLACE_BLOCKS: 500
ITEM_FRAME: 500
PLACE_BLOCKS: 500
CRAFTING: 0
ENCHANTING: 0
SHEARING: 500
BED: 500
ENCHANTING: 0
SPAWN_EGGS: 500
BED: 500
MILKING: 0
DISPENSER: 500
GATE: 0
EXPERIENCE_PICKUP: 500
HOPPER: 500
LEASH: 500
BREAK_BLOCKS: 500
MOUNT_INVENTORY: 500
BREAK_BLOCKS: 500
CHORUS_FRUIT: 500
CONTAINER: 500
JUKEBOX: 500
@ -178,8 +178,8 @@ world:
# These are the default settings for new islands
default-island-settings:
PVP_END: false
ANIMAL_SPAWN: true
PVP_NETHER: false
ANIMAL_SPAWN: true
MONSTER_SPAWN: true
FIRE_SPREAD: true
PVP_OVERWORLD: false
@ -284,10 +284,15 @@ island:
# 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
# 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:
# List of commands to run when a player joins.
on-join: []
# List of commands to run when a player leaves.
# list of commands to run when a player leaves.
on-leave: []
sethome:
nether: