forked from cijaaimee/Slime-World-Manager
-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
Describe the issue
I get spammed with a lot of errors in the console. I don't know really what it cause and what it is caused by.
Spigot version
1.18.2
Plugin version
2.8.0-SNAPSHOT
How to reproduce
I have a map which was imported into mysql datasource and I'm creating that world with my own function.
It's appearing after I leave the world. About 15-20 seconds after.
public void createIsland(String worldName, Consumer<World> worldConsumer) throws RuntimeException {
try {
if (mysqlLoader.worldExists(worldName)) {
var world = Bukkit.getWorld(worldName);
if (world != null) {
worldConsumer.accept(world);
return;
}
slimePlugin.asyncLoadWorld(mysqlLoader, worldName, true, islandProperties).thenAccept(newWorld -> {
System.out.println("loading the world: " + worldName);
Bukkit.getScheduler().runTask(plugin, () -> {
slimePlugin.generateWorld(newWorld.get());
World playerWorld = Bukkit.getWorld(worldName);
worldConsumer.accept(playerWorld);
});
});
} else {
mysqlLoader.unlockWorld("miner_world");
slimePlugin.asyncLoadWorld(mysqlLoader, "miner_world", true, islandProperties).thenAccept(slimeWorld -> {
Bukkit.getScheduler().runTask(plugin, () -> {
try {
SlimeWorld world = slimeWorld.get().clone(worldName, mysqlLoader);
slimePlugin.generateWorld(world);
World playerWorld = Bukkit.getWorld(worldName);
worldConsumer.accept(playerWorld);
} catch (WorldAlreadyExistsException | IOException e) {
throw new RuntimeException(e);
}
});
});
}
} catch (IOException | UnknownWorldException e) {
throw new RuntimeException(e);
}
}
Crash reports (if available)
https://paste.md-5.net/fasumufoqo.md
Metadata
Metadata
Assignees
Labels
No labels