1717import com .google .common .base .Enums ;
1818
1919import world .bentobox .aoneblock .listeners .BlockListener ;
20+ import world .bentobox .bentobox .BentoBox ;
2021import world .bentobox .bentobox .api .configuration .ConfigComment ;
2122import world .bentobox .bentobox .api .configuration .ConfigEntry ;
2223import world .bentobox .bentobox .api .configuration .StoreAt ;
@@ -196,9 +197,14 @@ public class Settings implements WorldSettings {
196197 @ ConfigEntry (path = "world.island-height" )
197198 private int islandHeight = 120 ;
198199
200+ @ ConfigComment ("The number of concurrent islands a player can have in the world" )
201+ @ ConfigComment ("A value of 0 will use the BentoBox config.yml default" )
202+ @ ConfigEntry (path = "world.concurrent-islands" )
203+ private int concurrentIslands = 0 ;
204+
199205 @ ConfigComment ("Disallow team members from having their own islands." )
200206 @ ConfigEntry (path = "world.disallow-team-member-islands" )
201- private boolean disallowTeamMemberIslands = false ;
207+ private boolean disallowTeamMemberIslands = true ;
202208
203209 @ ConfigComment ("Use your own world generator for this world." )
204210 @ ConfigComment ("In this case, the plugin will not generate anything." )
@@ -2213,4 +2219,23 @@ public String getOffset() {
22132219 public void setOffset (String offset ) {
22142220 this .offset = offset ;
22152221 }
2222+
2223+ /**
2224+ * @return the concurrentIslands
2225+ */
2226+ @ Override
2227+ public int getConcurrentIslands () {
2228+ if (concurrentIslands <= 0 ) {
2229+ return BentoBox .getInstance ().getSettings ().getIslandNumber ();
2230+ }
2231+ return concurrentIslands ;
2232+ }
2233+
2234+ /**
2235+ * @param concurrentIslands the concurrentIslands to set
2236+ */
2237+ public void setConcurrentIslands (int concurrentIslands ) {
2238+ this .concurrentIslands = concurrentIslands ;
2239+ }
2240+
22162241}
0 commit comments