From 1a2f3c111fcb61e3dfa631390e38401cef97a73f Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 28 Dec 2020 17:44:40 +0100 Subject: [PATCH 1/3] 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); From 98de83c22a63f7cf05934daa189a8f3ae14f93ca Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 28 Dec 2020 19:08:10 +0100 Subject: [PATCH 2/3] Fixed Color Code --- SpigotCore_Main/src/de/steamwar/sql/Team.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/de/steamwar/sql/Team.java b/SpigotCore_Main/src/de/steamwar/sql/Team.java index 7504476..823d9a5 100644 --- a/SpigotCore_Main/src/de/steamwar/sql/Team.java +++ b/SpigotCore_Main/src/de/steamwar/sql/Team.java @@ -31,7 +31,7 @@ public class Team { private final int teamLeader; private final String teamColor; - private static final Team pub = new Team(0, "PUB", "Öffentlich", 0, "8"); + private static final Team pub = new Team(0, "PUB", "Öffentlich", 0, "7"); private Team(int teamId, String teamKuerzel, String teamName, int teamLeader, String teamColor){ this.teamId = teamId; From d35207f3844e0c5f2627e83f86c994b5a5979745 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 29 Dec 2020 14:48:43 +0100 Subject: [PATCH 3/3] Fixing --- SpigotCore_Main/src/de/steamwar/sql/Team.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpigotCore_Main/src/de/steamwar/sql/Team.java b/SpigotCore_Main/src/de/steamwar/sql/Team.java index 823d9a5..7504476 100644 --- a/SpigotCore_Main/src/de/steamwar/sql/Team.java +++ b/SpigotCore_Main/src/de/steamwar/sql/Team.java @@ -31,7 +31,7 @@ public class Team { private final int teamLeader; private final String teamColor; - private static final Team pub = new Team(0, "PUB", "Öffentlich", 0, "7"); + private static final Team pub = new Team(0, "PUB", "Öffentlich", 0, "8"); private Team(int teamId, String teamKuerzel, String teamName, int teamLeader, String teamColor){ this.teamId = teamId;