@@ -39,7 +39,7 @@ public void onLoad() {
39
39
// Load settings from config.yml. This will check if there are any issues with it too.
40
40
loadSettings ();
41
41
// Chunk generator
42
- chunkGenerator = settings . isUseOwnGenerator () ? null : new ChunkGeneratorWorld (this );
42
+ chunkGenerator = new ChunkGeneratorWorld (this );
43
43
// Register commands
44
44
adminCommand = new AcidCommand (this , settings .getAdminCommand ());
45
45
playerCommand = new AiCommand (this , settings .getIslandCommand ());
@@ -103,8 +103,9 @@ public void createWorlds() {
103
103
getLogger ().info ("Creating AcidIsland..." );
104
104
}
105
105
// Create the world if it does not exist
106
- chunkGenerator = new ChunkGeneratorWorld (this );
107
- islandWorld = WorldCreator .name (worldName ).type (WorldType .FLAT ).environment (World .Environment .NORMAL ).generator (chunkGenerator )
106
+ islandWorld = WorldCreator .name (worldName ).type (WorldType .FLAT )
107
+ .environment (World .Environment .NORMAL )
108
+ .generator (settings .isUseOwnGenerator ()? null : chunkGenerator )
108
109
.createWorld ();
109
110
// Make the nether if it does not exist
110
111
if (settings .isNetherGenerate ()) {
@@ -115,7 +116,7 @@ public void createWorlds() {
115
116
netherWorld = WorldCreator .name (worldName + NETHER ).type (WorldType .NORMAL ).environment (World .Environment .NETHER ).createWorld ();
116
117
117
118
} else {
118
- netherWorld = WorldCreator .name (worldName + NETHER ).type (WorldType .FLAT ).generator (chunkGenerator )
119
+ netherWorld = WorldCreator .name (worldName + NETHER ).type (WorldType .FLAT ).generator (settings . isUseOwnGeneratorNether ()? null : chunkGenerator )
119
120
.environment (World .Environment .NETHER ).createWorld ();
120
121
}
121
122
}
@@ -127,7 +128,7 @@ public void createWorlds() {
127
128
if (!settings .isEndIslands ()) {
128
129
endWorld = WorldCreator .name (worldName + THE_END ).type (WorldType .NORMAL ).environment (World .Environment .THE_END ).createWorld ();
129
130
} else {
130
- endWorld = WorldCreator .name (worldName + THE_END ).type (WorldType .FLAT ).generator (chunkGenerator )
131
+ endWorld = WorldCreator .name (worldName + THE_END ).type (WorldType .FLAT ).generator (settings . isUseOwnGeneratorEnd ()? null : chunkGenerator )
131
132
.environment (World .Environment .THE_END ).createWorld ();
132
133
}
133
134
}
@@ -147,7 +148,12 @@ public void onReload() {
147
148
148
149
@ Override
149
150
public @ NonNull ChunkGenerator getDefaultWorldGenerator (String worldName , String id ) {
150
- return chunkGenerator ;
151
+ if ((islandWorld .getName ().equalsIgnoreCase (worldName ) && !settings .isUseOwnGenerator ())
152
+ || (netherWorld !=null && netherWorld .getName ().equalsIgnoreCase (worldName ) && !settings .isUseOwnGeneratorNether ())
153
+ || (endWorld != null && endWorld .getName ().equalsIgnoreCase (worldName ) && !settings .isUseOwnGeneratorEnd ())) {
154
+ return chunkGenerator ;
155
+ }
156
+ return null ;
151
157
}
152
158
153
159
@ Override
0 commit comments