SteamWar/SpigotCore
Archiviert
13
0

Add TeamColor #85

Manuell gemergt
Lixfel hat 3 Commits von team-color nach master 2021-01-02 09:37:24 +01:00 zusammengeführt

Datei anzeigen

@ -29,18 +29,20 @@ public class Team {
private final String teamKuerzel;
private final String teamName;
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.teamKuerzel = teamKuerzel;
this.teamName = teamName;
this.teamLeader = teamLeader;
this.teamColor = teamColor;
}
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){
@ -72,6 +74,10 @@ public class Team {
return teamLeader;
}
public String getTeamColor() {
return teamColor;
}
public List<Integer> getMembers(){
try{
ResultSet memberlist = SQL.select("SELECT id FROM UserData WHERE Team = ?", teamId);