1414import org .bukkit .block .Biome ;
1515import org .bukkit .entity .EntityType ;
1616
17- import com .google .common .base .Enums ;
18-
1917import world .bentobox .aoneblock .listeners .BlockListener ;
18+ import world .bentobox .bentobox .BentoBox ;
2019import world .bentobox .bentobox .api .configuration .ConfigComment ;
2120import world .bentobox .bentobox .api .configuration .ConfigEntry ;
2221import world .bentobox .bentobox .api .configuration .StoreAt ;
@@ -196,9 +195,14 @@ public class Settings implements WorldSettings {
196195 @ ConfigEntry (path = "world.island-height" )
197196 private int islandHeight = 120 ;
198197
198+ @ ConfigComment ("The number of concurrent islands a player can have in the world" )
199+ @ ConfigComment ("A value of 0 will use the BentoBox config.yml default" )
200+ @ ConfigEntry (path = "world.concurrent-islands" )
201+ private int concurrentIslands = 0 ;
202+
199203 @ ConfigComment ("Disallow team members from having their own islands." )
200204 @ ConfigEntry (path = "world.disallow-team-member-islands" )
201- private boolean disallowTeamMemberIslands = false ;
205+ private boolean disallowTeamMemberIslands = true ;
202206
203207 @ ConfigComment ("Use your own world generator for this world." )
204208 @ ConfigComment ("In this case, the plugin will not generate anything." )
@@ -226,13 +230,13 @@ public class Settings implements WorldSettings {
226230
227231 @ ConfigComment ("The default biome for the overworld" )
228232 @ ConfigEntry (path = "world.default-biome" )
229- private Biome defaultBiome = Biome . PLAINS ;
233+ private Biome defaultBiome ;
230234 @ ConfigComment ("The default biome for the nether world (this may affect what mobs can spawn)" )
231235 @ ConfigEntry (path = "world.default-nether-biome" )
232- private Biome defaultNetherBiome = Enums . getIfPresent ( Biome . class , "NETHER" ). or ( Enums . getIfPresent ( Biome . class , "NETHER_WASTES" ). or ( Biome . BADLANDS )) ;
236+ private Biome defaultNetherBiome ;
233237 @ ConfigComment ("The default biome for the end world (this may affect what mobs can spawn)" )
234238 @ ConfigEntry (path = "world.default-end-biome" )
235- private Biome defaultEndBiome = Biome . THE_END ;
239+ private Biome defaultEndBiome ;
236240
237241 @ ConfigComment ("The maximum number of players a player can ban at any one time in this game mode." )
238242 @ ConfigComment ("The permission acidisland.ban.maxlimit.X where X is a number can also be used per player" )
@@ -1440,7 +1444,7 @@ public boolean isWaterUnsafe() {
14401444 * @return default biome
14411445 */
14421446 public Biome getDefaultBiome () {
1443- return defaultBiome ;
1447+ return defaultBiome == null ? Biome . PLAINS : defaultBiome ;
14441448 }
14451449
14461450 /**
@@ -1885,7 +1889,7 @@ public void setDropOnTop(boolean dropOnTop) {
18851889 * @return the defaultNetherBiome
18861890 */
18871891 public Biome getDefaultNetherBiome () {
1888- return defaultNetherBiome ;
1892+ return defaultNetherBiome == null ? Biome . NETHER_WASTES : defaultNetherBiome ;
18891893 }
18901894
18911895 /**
@@ -1899,7 +1903,7 @@ public void setDefaultNetherBiome(Biome defaultNetherBiome) {
18991903 * @return the defaultEndBiome
19001904 */
19011905 public Biome getDefaultEndBiome () {
1902- return defaultEndBiome ;
1906+ return defaultEndBiome == null ? Biome . THE_END : defaultEndBiome ;
19031907 }
19041908
19051909 /**
@@ -2213,4 +2217,23 @@ public String getOffset() {
22132217 public void setOffset (String offset ) {
22142218 this .offset = offset ;
22152219 }
2220+
2221+ /**
2222+ * @return the concurrentIslands
2223+ */
2224+ @ Override
2225+ public int getConcurrentIslands () {
2226+ if (concurrentIslands <= 0 ) {
2227+ return BentoBox .getInstance ().getSettings ().getIslandNumber ();
2228+ }
2229+ return concurrentIslands ;
2230+ }
2231+
2232+ /**
2233+ * @param concurrentIslands the concurrentIslands to set
2234+ */
2235+ public void setConcurrentIslands (int concurrentIslands ) {
2236+ this .concurrentIslands = concurrentIslands ;
2237+ }
2238+
22162239}
0 commit comments