Cleanup
This commit is contained in:
parent
fb3dce512a
commit
2897016443
62 changed files with 278 additions and 462 deletions
|
|
@ -8,18 +8,18 @@ import org.gsdistance.grimmsServer.GrimmsServer;
|
|||
|
||||
public class DynamicDimensionGen {
|
||||
public static World newDimension(WorldConstructor worldConstructor) {
|
||||
if (Bukkit.getWorld(worldConstructor.name) != null) {
|
||||
return Bukkit.getWorld(worldConstructor.name);
|
||||
if (Bukkit.getWorld(worldConstructor.name()) != null) {
|
||||
return Bukkit.getWorld(worldConstructor.name());
|
||||
} else {
|
||||
// Create a new world with the specified name and type
|
||||
WorldCreator worldCreator = new WorldCreator(worldConstructor.name);
|
||||
WorldCreator worldCreator = new WorldCreator(worldConstructor.name());
|
||||
try {
|
||||
worldCreator.environment(World.Environment.valueOf(worldConstructor.type));
|
||||
worldCreator.environment(World.Environment.valueOf(worldConstructor.type()));
|
||||
} catch (EnumConstantNotPresentException e) {
|
||||
// If the environment type is not recognized, default to NORMAL
|
||||
worldCreator.environment(World.Environment.NORMAL);
|
||||
}
|
||||
worldCreator.generateStructures(worldConstructor.generateStructures);
|
||||
worldCreator.generateStructures(worldConstructor.generateStructures());
|
||||
return worldCreator.createWorld();
|
||||
}
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ public class DynamicDimensionGen {
|
|||
return;
|
||||
}
|
||||
for (WorldConstructor worldConstructor : worldConstructors) {
|
||||
if (Bukkit.getWorld(worldConstructor.name) == null) {
|
||||
if (Bukkit.getWorld(worldConstructor.name()) == null) {
|
||||
newDimension(worldConstructor);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue