world creation plan in comments

This commit is contained in:
danielb 2024-05-26 22:29:47 +00:00
parent e3ea4dd7dd
commit 9830c643f2
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,20 @@
package de.butzlabben.WorldSystem.data;
import lombok.SneakyThrows;
public class WorldData {
private static WorldData con;
private static SqlLiteDatabase core;
private WorldData() {
WorldData.core = SqlLiteDatabase.connect();
}
@SneakyThrows
public static WorldData connect() {
if (con == null) {
con = new WorldData();
}
return con;
}
}

View File

@ -32,7 +32,27 @@ public class WorldTemplate {
int id = data.getHighestID() + 1;
String worldname = "ID" + id + "-" + uuid;
//create an event to different hooks
//create a new database entry for the world
//setup the world folder
//create a new database entry for the worlds data
//load the world for bukkit
//lock the world world as createing
//establish a async task for world generation.
/*
WorldCreateEvent event = new WorldCreateEvent(uniqueID, creator);
Bukkit.getPluginManager().callEvent(event);
if (event.isCancelled())
@ -110,6 +130,7 @@ public class WorldTemplate {
}.runTaskLater(WorldSystem.getInstance(), 1);
return true;
*/
return false;
}
}