14
14
import org .bukkit .block .Biome ;
15
15
import org .bukkit .entity .EntityType ;
16
16
17
- import com .google .common .base .Enums ;
18
-
19
17
import world .bentobox .aoneblock .listeners .BlockListener ;
18
+ import world .bentobox .bentobox .BentoBox ;
20
19
import world .bentobox .bentobox .api .configuration .ConfigComment ;
21
20
import world .bentobox .bentobox .api .configuration .ConfigEntry ;
22
21
import world .bentobox .bentobox .api .configuration .StoreAt ;
@@ -196,9 +195,14 @@ public class Settings implements WorldSettings {
196
195
@ ConfigEntry (path = "world.island-height" )
197
196
private int islandHeight = 120 ;
198
197
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
+
199
203
@ ConfigComment ("Disallow team members from having their own islands." )
200
204
@ ConfigEntry (path = "world.disallow-team-member-islands" )
201
- private boolean disallowTeamMemberIslands = false ;
205
+ private boolean disallowTeamMemberIslands = true ;
202
206
203
207
@ ConfigComment ("Use your own world generator for this world." )
204
208
@ ConfigComment ("In this case, the plugin will not generate anything." )
@@ -226,13 +230,13 @@ public class Settings implements WorldSettings {
226
230
227
231
@ ConfigComment ("The default biome for the overworld" )
228
232
@ ConfigEntry (path = "world.default-biome" )
229
- private Biome defaultBiome = Biome . PLAINS ;
233
+ private Biome defaultBiome ;
230
234
@ ConfigComment ("The default biome for the nether world (this may affect what mobs can spawn)" )
231
235
@ 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 ;
233
237
@ ConfigComment ("The default biome for the end world (this may affect what mobs can spawn)" )
234
238
@ ConfigEntry (path = "world.default-end-biome" )
235
- private Biome defaultEndBiome = Biome . THE_END ;
239
+ private Biome defaultEndBiome ;
236
240
237
241
@ ConfigComment ("The maximum number of players a player can ban at any one time in this game mode." )
238
242
@ 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() {
1440
1444
* @return default biome
1441
1445
*/
1442
1446
public Biome getDefaultBiome () {
1443
- return defaultBiome ;
1447
+ return defaultBiome == null ? Biome . PLAINS : defaultBiome ;
1444
1448
}
1445
1449
1446
1450
/**
@@ -1885,7 +1889,7 @@ public void setDropOnTop(boolean dropOnTop) {
1885
1889
* @return the defaultNetherBiome
1886
1890
*/
1887
1891
public Biome getDefaultNetherBiome () {
1888
- return defaultNetherBiome ;
1892
+ return defaultNetherBiome == null ? Biome . NETHER_WASTES : defaultNetherBiome ;
1889
1893
}
1890
1894
1891
1895
/**
@@ -1899,7 +1903,7 @@ public void setDefaultNetherBiome(Biome defaultNetherBiome) {
1899
1903
* @return the defaultEndBiome
1900
1904
*/
1901
1905
public Biome getDefaultEndBiome () {
1902
- return defaultEndBiome ;
1906
+ return defaultEndBiome == null ? Biome . THE_END : defaultEndBiome ;
1903
1907
}
1904
1908
1905
1909
/**
@@ -2213,4 +2217,23 @@ public String getOffset() {
2213
2217
public void setOffset (String offset ) {
2214
2218
this .offset = offset ;
2215
2219
}
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
+
2216
2239
}
0 commit comments