Adding schematic by id method
Dieser Commit ist enthalten in:
Ursprung
5534cfb6d9
Commit
abd9815de9
@ -64,6 +64,17 @@ public class Schematic {
|
||||
}
|
||||
}
|
||||
|
||||
public static Schematic getSchemFromDB(int schemID){
|
||||
ResultSet schematic = SQL.select("SELECT SchemID, SchemName, SchemOwner, Item, SchemType, SchemFormat FROM Schematic WHERE SchemID = ?", schemID);
|
||||
try {
|
||||
if(!schematic.next())
|
||||
throw new SecurityException("Failed loading schematic " + schemID);
|
||||
return new Schematic(schematic);
|
||||
} catch (SQLException e) {
|
||||
throw new SecurityException("Failed loading schematic", e);
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Schematic> getSchemsAccessibleByUser(UUID schemOwner){
|
||||
return getSchemsAccessibleByUser(SteamwarUser.get(schemOwner).getId());
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren