#Issues with creating custom worlds
1 messages · Page 1 of 1 (latest)
private World world;
public ArenaWorld(String worldName, Main main) {
Bukkit.getScheduler().scheduleSyncDelayedTask(main,()->{
world = Bukkit.createWorld(new WorldCreator(worldName).generator(new ArenaChunkGenerator()));
world.setSpawnLocation(0, 64, 0);
}
);
}
public World getWorld() {
return world;
}
}```
That is called from:
ArenaWorld arena = new ArenaWorld("arena-1", main);
arenaWorld = arena.getWorld();```
Which is called from a command executor.
The issue is that my server stops responding when trying to generate the world.
Probably not the best solution, but I don't think there is a way to generate world async on newest versions.
World#keepSpawnInMemory(false)
I'm using 1.16.5
Then Advanced Slime World Manager might help you
possibly, idk what exactly it is but I saw some async thing
I don't need it to be async
I need it to not freeze the server and to generate the world.
well you need it to not freeze the server
so doing it async is the first thing that comes to my mind
There may be a different way besides async and the keepspawninmemory
But I won't be able to help with those
Should I try keepSpawnInMemory?
well you can try it for sure
Same issue
When I use a regular world generator it seems that the world generates
That or it was me taking a 5 minute break with the server on.
This in onEnable works perfectlygetServer().createWorld(new WorldCreator("arena-1"));
But I need a custom generator
So close to working...
[15:50:57] [Server thread/INFO]: [MiniGame] Game starting in 1 second.
[15:50:57] [Server thread/WARN]: [UHC] Task #2 for UHC v1.0-SNAPSHOT generated an exception
java.lang.IllegalArgumentException: location.world
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.craftbukkit.v1_16_R3.entity.CraftPlayer.teleport(CraftPlayer.java:652) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.craftbukkit.v1_16_R3.entity.CraftEntity.teleport(CraftEntity.java:475) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
at com.textualmold9830.uhc.countdowns.PreGameTimer.setupGame(PreGameTimer.java:70) ~[?:?]
at com.textualmold9830.uhc.countdowns.PreGameTimer$1.run(PreGameTimer.java:58) ~[?:?]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:400) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]
at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1179) ~[spigot-1.16.5.jar:3096a-Spigot-9fb885e-af1a232]