SteamWar/SpigotCore
Archiviert
13
0
Dieser Commit ist enthalten in:
Chaoscaot 2020-12-28 17:44:40 +01:00
Ursprung 88e4b4b092
Commit 1a2f3c111f

Datei anzeigen

@ -29,18 +29,20 @@ public class Team {
private final String teamKuerzel; private final String teamKuerzel;
private final String teamName; private final String teamName;
private final int teamLeader; private final int teamLeader;
private final String teamColor;
private static final Team pub = new Team(0, "PUB", "Öffentlich", 0); private static final Team pub = new Team(0, "PUB", "Öffentlich", 0, "8");
private Team(int teamId, String teamKuerzel, String teamName, int teamLeader){ private Team(int teamId, String teamKuerzel, String teamName, int teamLeader, String teamColor){
this.teamId = teamId; this.teamId = teamId;
this.teamKuerzel = teamKuerzel; this.teamKuerzel = teamKuerzel;
this.teamName = teamName; this.teamName = teamName;
this.teamLeader = teamLeader; this.teamLeader = teamLeader;
this.teamColor = teamColor;
} }
private Team(ResultSet rs) throws SQLException { private Team(ResultSet rs) throws SQLException {
this(rs.getInt("TeamID"), rs.getString("TeamKuerzel"), rs.getString("TeamName"), rs.getInt("TeamLeader")); this(rs.getInt("TeamID"), rs.getString("TeamKuerzel"), rs.getString("TeamName"), rs.getInt("TeamLeader"), rs.getString("TeamColor"));
} }
public static Team get(int id){ public static Team get(int id){
@ -72,6 +74,10 @@ public class Team {
return teamLeader; return teamLeader;
} }
public String getTeamColor() {
return teamColor;
}
public List<Integer> getMembers(){ public List<Integer> getMembers(){
try{ try{
ResultSet memberlist = SQL.select("SELECT id FROM UserData WHERE Team = ?", teamId); ResultSet memberlist = SQL.select("SELECT id FROM UserData WHERE Team = ?", teamId);