mirror of
https://github.com/trainerlord/WorldSystem.git
synced 2024-11-21 11:35:12 +01:00
world creation plan in comments
This commit is contained in:
parent
e3ea4dd7dd
commit
9830c643f2
20
src/main/java/de/butzlabben/WorldSystem/data/WorldData.java
Normal file
20
src/main/java/de/butzlabben/WorldSystem/data/WorldData.java
Normal 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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user