From 33273be4fd56400bc5b0dde9db0100a311c58ab0 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Mon, 29 Jul 2019 21:21:12 +0200 Subject: [PATCH] Teamname case ignore --- src/de/steamwar/bungeecore/sql/Team.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/de/steamwar/bungeecore/sql/Team.java b/src/de/steamwar/bungeecore/sql/Team.java index 7a8855c..9ff37da 100644 --- a/src/de/steamwar/bungeecore/sql/Team.java +++ b/src/de/steamwar/bungeecore/sql/Team.java @@ -36,12 +36,12 @@ public class Team { public static Team get(String name){ for(Team team : teamCache) - if(team.teamName.equals(name)) + if(team.teamName.equalsIgnoreCase(name)) return team; for(Team team : teamCache) - if(team.teamKuerzel.equals(name)) + if(team.teamKuerzel.equalsIgnoreCase(name)) return team; - return load(sql.select("SELECT * FROM Team WHERE TeamName = '" + sql.disarmString(name) + "' OR TeamKuerzel = '" + sql.disarmString(name) + "'")); + return load(sql.select("SELECT * FROM Team WHERE lower(TeamName) = '" + sql.disarmString(name).toLowerCase() + "' OR lower(TeamKuerzel) = '" + sql.disarmString(name).toLowerCase() + "'")); } public static void clearCache(){