TCheckpoint
This commit is contained in:
parent
26daa1e830
commit
9bc57fdcb4
52 changed files with 563 additions and 111 deletions
|
|
@ -0,0 +1,25 @@
|
|||
package org.gsdistance.grimmsServer.Indexers;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.WorldCreator;
|
||||
import org.gsdistance.grimmsServer.Constructable.WorldConstructor;
|
||||
|
||||
public class DynamicDimensionGen {
|
||||
public static World newDimension(WorldConstructor worldConstructor) {
|
||||
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);
|
||||
try {
|
||||
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);
|
||||
return worldCreator.createWorld();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
package org.gsdistance.grimmsServer.Indexers;
|
||||
|
||||
public class RecipeIndexer {
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue