Skip to content

Commit

Permalink
Merge pull request #302 from BentoBoxWorld/develop
Browse files Browse the repository at this point in the history
Version 1.12.2
  • Loading branch information
tastybento authored Feb 18, 2023
2 parents 9783869 + 7952eb2 commit ffc1a3e
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<!-- 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.12.1</build.version>
<build.version>1.12.2</build.version>
<!-- SonarCloud -->
<sonar.projectKey>BentoBoxWorld_AOneBlock</sonar.projectKey>
<sonar.organization>bentobox-world</sonar.organization>
Expand Down
104 changes: 99 additions & 5 deletions src/main/java/world/bentobox/aoneblock/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import org.bukkit.block.Biome;
import org.bukkit.entity.EntityType;

import com.google.common.base.Enums;

import world.bentobox.aoneblock.listeners.BlockListener;
import world.bentobox.bentobox.api.configuration.ConfigComment;
import world.bentobox.bentobox.api.configuration.ConfigEntry;
Expand Down Expand Up @@ -159,6 +161,13 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.use-own-generator")
private boolean useOwnGenerator;

@ConfigComment("Sea height (don't changes this mid-game unless you delete the world)")
@ConfigComment("Minimum is 0")
@ConfigComment("If sea height is less than about 10, then players will drop right through it")
@ConfigComment("if it exists.")
@ConfigEntry(path = "world.sea-height", needsReset = true)
private int seaHeight = 0;

@ConfigComment("Maximum number of islands in the world. Set to -1 or 0 for unlimited.")
@ConfigComment("If the number of islands is greater than this number, it will stop players from creating islands.")
@ConfigEntry(path = "world.max-islands")
Expand All @@ -172,6 +181,12 @@ public class Settings implements WorldSettings {
@ConfigComment("The default biome for the overworld")
@ConfigEntry(path = "world.default-biome")
private Biome defaultBiome = Biome.PLAINS;
@ConfigComment("The default biome for the nether world (this may affect what mobs can spawn)")
@ConfigEntry(path = "world.default-nether-biome")
private Biome defaultNetherBiome = Enums.getIfPresent(Biome.class, "NETHER").or(Enums.getIfPresent(Biome.class, "NETHER_WASTES").or(Biome.BADLANDS));
@ConfigComment("The default biome for the end world (this may affect what mobs can spawn)")
@ConfigEntry(path = "world.default-end-biome")
private Biome defaultEndBiome = Biome.THE_END;

@ConfigComment("The maximum number of players a player can ban at any one time in this game mode.")
@ConfigComment("The permission acidisland.ban.maxlimit.X where X is a number can also be used per player")
Expand All @@ -188,6 +203,17 @@ public class Settings implements WorldSettings {
@ConfigEntry(path = "world.nether.generate")
private boolean netherGenerate = true;

@ConfigComment("Islands in Nether. Change to false for standard vanilla nether.")
@ConfigComment("Note that there is currently no magic block in the Nether")
@ConfigEntry(path = "world.nether.islands", needsReset = true)
private boolean netherIslands = false;

@ConfigComment("Make the nether roof, if false, there is nothing up there")
@ConfigComment("Change to false if lag is a problem from the generation")
@ConfigComment("Only applies to islands Nether")
@ConfigEntry(path = "world.nether.roof")
private boolean netherRoof = false;

@ConfigComment("Nether spawn protection radius - this is the distance around the nether spawn")
@ConfigComment("that will be protected from player interaction (breaking blocks, pouring lava etc.)")
@ConfigComment("Minimum is 0 (not recommended), maximum is 100. Default is 25.")
Expand All @@ -203,11 +229,16 @@ public class Settings implements WorldSettings {
private boolean makeNetherPortals = false;

// End
@ConfigComment("End world - if this is false, the end world will not be made and access to")
@ConfigComment("End Nether - if this is false, the end world will not be made and access to")
@ConfigComment("the end will not occur. Other plugins may still enable portal usage.")
@ConfigEntry(path = "world.end.generate")
private boolean endGenerate = false;

@ConfigComment("Islands in The End. Change to false for standard vanilla end.")
@ConfigComment("Note that there is currently no magic block in the End")
@ConfigEntry(path = "world.end.islands", needsReset = true)
private boolean endIslands = false;

@ConfigComment("This option indicates if obsidian platform in the end should be generated")
@ConfigComment("when player enters the end world.")
@ConfigComment("This option requires `allow-end=true` in bukkit.yml.")
Expand Down Expand Up @@ -613,7 +644,7 @@ public boolean isUseOwnGenerator() {
*/
@Override
public int getSeaHeight() {
return 0;
return seaHeight;
}

/**
Expand Down Expand Up @@ -645,7 +676,14 @@ public boolean isNetherGenerate() {
*/
@Override
public boolean isNetherIslands() {
return false;
return netherIslands;
}

/**
* @return the netherRoof
*/
public boolean isNetherRoof() {
return netherRoof;
}

/**
Expand All @@ -669,7 +707,7 @@ public boolean isEndGenerate() {
*/
@Override
public boolean isEndIslands() {
return false;
return endIslands;
}

/**
Expand Down Expand Up @@ -1049,6 +1087,13 @@ public void setUseOwnGenerator(boolean useOwnGenerator) {
this.useOwnGenerator = useOwnGenerator;
}

/**
* @param seaHeight the seaHeight to set
*/
public void setSeaHeight(int seaHeight) {
this.seaHeight = seaHeight;
}

/**
* @param maxIslands the maxIslands to set
*/
Expand All @@ -1070,6 +1115,20 @@ public void setNetherGenerate(boolean netherGenerate) {
this.netherGenerate = netherGenerate;
}

/**
* @param netherIslands the netherIslands to set
*/
public void setNetherIslands(boolean netherIslands) {
this.netherIslands = netherIslands;
}

/**
* @param netherRoof the netherRoof to set
*/
public void setNetherRoof(boolean netherRoof) {
this.netherRoof = netherRoof;
}

/**
* @param netherSpawnRadius the netherSpawnRadius to set
*/
Expand All @@ -1084,6 +1143,13 @@ public void setEndGenerate(boolean endGenerate) {
this.endGenerate = endGenerate;
}

/**
* @param endIslands the endIslands to set
*/
public void setEndIslands(boolean endIslands) {
this.endIslands = endIslands;
}

/**
* @param removeMobsWhitelist the removeMobsWhitelist to set
*/
Expand Down Expand Up @@ -1769,6 +1835,34 @@ public void setDropOnTop(boolean dropOnTop) {
this.dropOnTop = dropOnTop;
}

/**
* @return the defaultNetherBiome
*/
public Biome getDefaultNetherBiome() {
return defaultNetherBiome;
}

/**
* @param defaultNetherBiome the defaultNetherBiome to set
*/
public void setDefaultNetherBiome(Biome defaultNetherBiome) {
this.defaultNetherBiome = defaultNetherBiome;
}

/**
* @return the defaultEndBiome
*/
public Biome getDefaultEndBiome() {
return defaultEndBiome;
}

/**
* @param defaultEndBiome the defaultEndBiome to set
*/
public void setDefaultEndBiome(Biome defaultEndBiome) {
this.defaultEndBiome = defaultEndBiome;
}

/**
* @return the makeNetherPortals
*/
Expand Down Expand Up @@ -1910,4 +2004,4 @@ public int getHologramDuration() {
public void setHologramDuration(int hologramDuration) {
this.hologramDuration = hologramDuration;
}
}
}
26 changes: 25 additions & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ world:
# If used, you must specify the world name and generator in the bukkit.yml file.
# See https://bukkit.gamepedia.com/Bukkit.yml#.2AOPTIONAL.2A_worlds
use-own-generator: false
# Sea height (don't changes this mid-game unless you delete the world)
# Minimum is 0
# If sea height is less than about 10, then players will drop right through it
# if it exists.
# /!\ 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.
sea-height: 0
# Maximum number of islands in the world. Set to -1 or 0 for unlimited.
# If the number of islands is greater than this number, it will stop players from creating islands.
max-islands: 0
Expand All @@ -107,6 +113,10 @@ world:
default-game-mode: SURVIVAL
# The default biome for the overworld
default-biome: PLAINS
# The default biome for the nether world (this may affect what mobs can spawn)
default-nether-biome: NETHER_WASTES
# The default biome for the end world (this may affect what mobs can spawn)
default-end-biome: THE_END
# The maximum number of players a player can ban at any one time in this game mode.
# The permission acidisland.ban.maxlimit.X where X is a number can also be used per player
# -1 = unlimited
Expand All @@ -118,6 +128,14 @@ world:
# Note that with a standard nether all players arrive at the same portal and entering a
# portal will return them back to their islands.
generate: true
# Islands in Nether. Change to false for standard vanilla nether.
# Note that there is currently no magic block in the Nether
# /!\ 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.
islands: false
# Make the nether roof, if false, there is nothing up there
# Change to false if lag is a problem from the generation
# Only applies to islands Nether
roof: false
# Nether spawn protection radius - this is the distance around the nether spawn
# that will be protected from player interaction (breaking blocks, pouring lava etc.)
# Minimum is 0 (not recommended), maximum is 100. Default is 25.
Expand All @@ -130,9 +148,13 @@ world:
# Added since 1.16.
create-and-link-portals: false
end:
# End world - if this is false, the end world will not be made and access to
# End Nether - if this is false, the end world will not be made and access to
# the end will not occur. Other plugins may still enable portal usage.
generate: true
# Islands in The End. Change to false for standard vanilla end.
# Note that there is currently no magic block in the End
# /!\ 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.
islands: false
# This option indicates if obsidian platform in the end should be generated
# when player enters the end world.
# This option requires `allow-end=true` in bukkit.yml.
Expand All @@ -150,6 +172,7 @@ world:
PISTON_PUSH: false
ISLAND_RESPAWN: true
CREEPER_GRIEFING: false
VISITOR_KEEP_INVENTORY: false
COARSE_DIRT_TILLING: true
ENDERMAN_GRIEFING: true
CLEAN_SUPER_FLAT: false
Expand Down Expand Up @@ -514,3 +537,4 @@ protection:
do-not-edit-these-settings:
# These settings should not be edited
reset-epoch: 0

Loading

0 comments on commit ffc1a3e

Please sign in to comment.