SteamWar/SpigotCore
Archiviert
13
0

SchemMember bugfix

Dieser Commit ist enthalten in:
Lixfel 2019-03-30 18:33:21 +01:00
Ursprung 499af7d28d
Commit 0b2248de9a

Datei anzeigen

@ -41,7 +41,7 @@ public class SchematicMember {
} }
public static SchematicMember getSchemMemberFromDB(String schemName, int schemOwner, int schemMember){ public static SchematicMember getSchemMemberFromDB(String schemName, int schemOwner, int schemMember){
ResultSet schematicMember = sql.select("SELECT * FROM SchematicMember WHERE SchemName = '" + schemName + "' AND SchemOwner = '" + schemOwner + "' AND Member = '" + schemMember + "'"); ResultSet schematicMember = sql.select("SELECT * FROM SchemMember WHERE SchemName = '" + schemName + "' AND SchemOwner = '" + schemOwner + "' AND Member = '" + schemMember + "'");
try { try {
if(schematicMember == null || !schematicMember.next()){ if(schematicMember == null || !schematicMember.next()){
return null; return null;
@ -58,7 +58,7 @@ public class SchematicMember {
} }
public static List<SchematicMember> getSchemMembers(String schemName, int schemOwner){ public static List<SchematicMember> getSchemMembers(String schemName, int schemOwner){
ResultSet schematicMember = sql.select("SELECT * FROM SchematicMember WHERE SchemName = '" + schemName + "' AND SchemOwner = '" + schemOwner + "'"); ResultSet schematicMember = sql.select("SELECT * FROM SchemMember WHERE SchemName = '" + schemName + "' AND SchemOwner = '" + schemOwner + "'");
try { try {
List<SchematicMember> schematicMembers = new ArrayList<>(); List<SchematicMember> schematicMembers = new ArrayList<>();
while(schematicMember.next()){ while(schematicMember.next()){
@ -77,7 +77,7 @@ public class SchematicMember {
} }
public static List<SchematicMember> getAccessibleSchems(int schemMember){ public static List<SchematicMember> getAccessibleSchems(int schemMember){
ResultSet schematicMember = sql.select("SELECT * FROM SchematicMember WHERE Member = '" + schemMember + "'"); ResultSet schematicMember = sql.select("SELECT * FROM SchemMember WHERE Member = '" + schemMember + "'");
try { try {
List<SchematicMember> schematicMembers = new ArrayList<>(); List<SchematicMember> schematicMembers = new ArrayList<>();
while(schematicMember.next()){ while(schematicMember.next()){
@ -105,6 +105,6 @@ public class SchematicMember {
} }
public void remove(){ public void remove(){
sql.update("DELETE FROM Schematic WHERE SchemOwner = " + SchemOwner + " AND SchemName = '" + SchemName + "' AND Member = '" + Member + "'"); sql.update("DELETE FROM SchemMember WHERE SchemOwner = " + SchemOwner + " AND SchemName = '" + SchemName + "' AND Member = '" + Member + "'");
} }
} }