Skip to content

Commit 811ae70

Browse files
committed
Add setting to allow structures in seed world
1 parent af355cd commit 811ae70

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ public class Settings implements WorldSettings {
8686
@ConfigComment("Other plugins may override this setting")
8787
@ConfigEntry(path = "world.difficulty")
8888
private Difficulty difficulty = Difficulty.NORMAL;
89+
90+
@ConfigComment("Allow structures to generate in the seed world")
91+
@ConfigEntry(path = "world.allow-structures")
92+
private boolean allowStructures;
8993

9094
@ConfigComment("Spawn limits. These override the limits set in bukkit.yml")
9195
@ConfigComment("If set to a negative number, the server defaults will be used")
@@ -1801,4 +1805,15 @@ public void setDisallowTeamMemberIslands(boolean disallowTeamMemberIslands) {
18011805
this.disallowTeamMemberIslands = disallowTeamMemberIslands;
18021806
}
18031807

1808+
public boolean isAllowStructures() {
1809+
return allowStructures;
1810+
}
1811+
1812+
/**
1813+
* @param allowStructures the allowStructures to set
1814+
*/
1815+
public void setAllowStructures(boolean allowStructures) {
1816+
this.allowStructures = allowStructures;
1817+
}
1818+
18041819
}

src/main/java/world/bentobox/boxed/generators/chunks/AbstractBoxedChunkGenerator.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ public boolean shouldGenerateMobs() {
136136

137137
@Override
138138
public boolean shouldGenerateStructures() {
139-
return false;
140-
//return this.addon.getSettings().isAllowStructures();
139+
return this.addon.getSettings().isAllowStructures();
141140
}
142141

143142
}

0 commit comments

Comments
 (0)