1
0

Add area-related tables to SQLite database

I am adding area protection to this mod since I have yet to find one for
Fabric, and people have been complaining about it for as long as I can
remember. (Honestly, I'd like it too.)
This commit is contained in:
Ryan Fox 2020-10-27 06:45:26 +00:00
parent af915a696c
commit 320199d2a6
Signed by: flewkey
GPG Key ID: 94F56ADFD848851E

View File

@ -36,6 +36,24 @@ public class Database {
"home TEXT," +
"PRIMARY KEY(uuid)" +
");");
stmt.executeUpdate(
"CREATE TABLE IF NOT EXISTS claims (" +
"id TEXT NOT NULL UNIQUE," +
"owner TEXT NOT NULL," +
"members TEXT NOT NULL," +
"rules TEXT NOT NULL," +
"PRIMARY KEY(id)" +
");");
stmt.executeUpdate(
"CREATE TABLE IF NOT EXISTS areas (" +
"chunk_x INTEGER NOT NULL," +
"chunk_z INTEGER NOT NULL," +
"min_x INTEGER NOT NULL," +
"min_z INTEGER NOT NULL," +
"max_x INTEGER NOT NULL," +
"max_z INTEGER NOT NULL," +
"claim TEXT NOT NULL" +
");");
stmt.close();
} catch (SQLException e) {
LOGGER.error(e.getMessage(), e);