From 1a2f3c111fcb61e3dfa631390e38401cef97a73f Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 28 Dec 2020 17:44:40 +0100 Subject: [PATCH] Add TeamColor --- SpigotCore_Main/src/de/steamwar/sql/Team.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/SpigotCore_Main/src/de/steamwar/sql/Team.java b/SpigotCore_Main/src/de/steamwar/sql/Team.java index dceee70..7504476 100644 --- a/SpigotCore_Main/src/de/steamwar/sql/Team.java +++ b/SpigotCore_Main/src/de/steamwar/sql/Team.java @@ -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 getMembers(){ try{ ResultSet memberlist = SQL.select("SELECT id FROM UserData WHERE Team = ?", teamId);