You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: This should all be prepared statements, but that breaks for some reason
98
99
if (!isUsingSqlite) {
99
100
PreparedStatementdatabaseStatement = connection.get().prepareStatement("CREATE DATABASE IF NOT EXISTS " + database);
100
101
databaseStatement.execute();
101
102
databaseStatement.close();
102
103
}
103
104
104
-
PreparedStatementgroupMembersStatement = connection.get().prepareStatement("CREATE TABLE IF NOT EXISTS " + database + "groupMembers (uuid VARCHAR(767) NOT NULL, `group` VARCHAR(700) NOT NULL, `primary` TINYINT NOT NULL)");
105
+
PreparedStatementgroupMembersStatement = connection.get().prepareStatement("CREATE TABLE IF NOT EXISTS " + database +
106
+
"groupMembers (uuid VARCHAR(767) NOT NULL, `group` VARCHAR(700) NOT NULL, `primary` TINYINT NOT NULL, ladderPosition INTEGER NOT NULL)");
105
107
groupMembersStatement.execute();
106
108
groupMembersStatement.close();
107
109
108
110
PreparedStatementgroupPermissionsStatement = connection.get().prepareStatement("CREATE TABLE IF NOT EXISTS " + database +"groupPermissions (groupName VARCHAR(767) NOT NULL, permission VARCHAR(767) NOT NULL)");
109
111
groupPermissionsStatement.execute();
110
112
groupPermissionsStatement.close();
111
113
112
-
PreparedStatementgroupsStatement = connection.get().prepareStatement("CREATE TABLE IF NOT EXISTS " + database + "groups (name VARCHAR(100) NOT NULL UNIQUE, prefix VARCHAR(100) NOT NULL, suffix VARCHAR(100) NOT NULL, chatcolor VARCHAR(4) NOT NULL, defaultGroup TINYINT NOT NULL)");
114
+
PreparedStatementgroupsStatement = connection.get().prepareStatement("CREATE TABLE IF NOT EXISTS " + database +
115
+
"groups (name VARCHAR(100) NOT NULL UNIQUE, prefix VARCHAR(100) NOT NULL, suffix VARCHAR(100) NOT NULL, chatcolor VARCHAR(4) NOT NULL, defaultGroup TINYINT NOT NULL, ladder VARCHAR(767))");
113
116
groupsStatement.execute();
114
117
groupsStatement.close();
115
118
@@ -121,6 +124,14 @@ public void initialize() {
121
124
superAdminStatement.execute();
122
125
superAdminStatement.close();
123
126
127
+
PreparedStatementladderStatement = connection.get().prepareStatement("CREATE TABLE IF NOT EXISTS " + database + "ladders (name VARCHAR(767))");
128
+
ladderStatement.execute();
129
+
ladderStatement.close();
130
+
131
+
PreparedStatementladderLevelStatement = connection.get().prepareStatement("CREATE TABLE IF NOT EXISTS " + database + "ladderLevels (ladder VARCHAR(767), name VARCHAR(767), power INTEGER)");
132
+
ladderLevelStatement.execute();
133
+
ladderLevelStatement.close();
134
+
124
135
if (!hasFormattingTable(connection.get(), database)) {
125
136
PreparedStatementformattingStatement = connection.get().prepareStatement("CREATE TABLE IF NOT EXISTS " + database + "formatting (`format` VARCHAR(400) NOT NULL, formatter VARCHAR(200) NOT NULL)");
126
137
formattingStatement.execute();
@@ -163,59 +174,131 @@ public void reload(List<UUID> onlinePlayers) {
0 commit comments