Skip to content

Commit 197d339

Browse files
committed
Added to config.yml
BentoBoxWorld/BentoBox#2470
1 parent db020f0 commit 197d339

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<powermock.version>2.0.9</powermock.version>
6060
<!-- More visible way how to change dependency versions -->
6161
<spigot.version>1.20.4-R0.1-SNAPSHOT</spigot.version>
62-
<bentobox.version>2.3.0-SNAPSHOT</bentobox.version>
62+
<bentobox.version>2.5.0-SNAPSHOT</bentobox.version>
6363
<level.version>2.6.2</level.version>
6464
<bank.version>1.3.0</bank.version>
6565
<!-- Revision variable removes warning about dynamic version -->

src/main/java/world/bentobox/aoneblock/Settings.java

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import com.google.common.base.Enums;
1818

1919
import world.bentobox.aoneblock.listeners.BlockListener;
20+
import world.bentobox.bentobox.BentoBox;
2021
import world.bentobox.bentobox.api.configuration.ConfigComment;
2122
import world.bentobox.bentobox.api.configuration.ConfigEntry;
2223
import 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
}

src/main/resources/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ world:
126126
# It is the y coordinate of the bedrock block in the schem.
127127
island-height: 80
128128
# Disallow team members from having their own islands.
129-
disallow-team-member-islands: false
129+
disallow-team-member-islands: true
130130
# Use your own world generator for this world.
131131
# In this case, the plugin will not generate anything.
132132
# If used, you must specify the world name and generator in the bukkit.yml file.

0 commit comments

Comments
 (0)