From a3179483fde394351612b4246a7ab7e2370db334 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Fri, 20 Nov 2020 09:45:33 +0100 Subject: [PATCH] Changing Messages --- src/de/steamwar/bungeecore/commands/PollresultCommand.java | 4 +--- src/de/steamwar/bungeecore/sql/PollAnswer.java | 2 +- src/de/steamwar/messages/BungeeCore.properties | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/PollresultCommand.java b/src/de/steamwar/bungeecore/commands/PollresultCommand.java index f8412dc..bdcfb1b 100644 --- a/src/de/steamwar/bungeecore/commands/PollresultCommand.java +++ b/src/de/steamwar/bungeecore/commands/PollresultCommand.java @@ -41,10 +41,8 @@ public class PollresultCommand extends BasicCommand { Map voted = PollAnswer.getCurrentResults(); Message.send("POLLRESULT_HEADER", player, PollAnswer.getAllAnswered(), PollSystem.getQuestion()); - int i = 1; for (Map.Entry e: voted.entrySet()) { - Message.send("POLLRESULT_LIST", sender, i, e.getKey(), e.getValue()); - i++; + Message.send("POLLRESULT_LIST", sender, e.getKey(), e.getValue()); } } } diff --git a/src/de/steamwar/bungeecore/sql/PollAnswer.java b/src/de/steamwar/bungeecore/sql/PollAnswer.java index f8f6b74..72c462f 100644 --- a/src/de/steamwar/bungeecore/sql/PollAnswer.java +++ b/src/de/steamwar/bungeecore/sql/PollAnswer.java @@ -70,7 +70,7 @@ public class PollAnswer { } public static Integer getAllAnswered() { - ResultSet set = SQL.select("SELECT Count(UserID) AS Times FROM PollAnswer"); + ResultSet set = SQL.select("SELECT Count(UserID) AS Times FROM PollAnswer WHERE Question = ?", PollSystem.getQuestion()); try { if(!set.next()) throw new SecurityException("Could not get PollAnswers"); diff --git a/src/de/steamwar/messages/BungeeCore.properties b/src/de/steamwar/messages/BungeeCore.properties index 5bcca7f..0bf5a04 100644 --- a/src/de/steamwar/messages/BungeeCore.properties +++ b/src/de/steamwar/messages/BungeeCore.properties @@ -55,5 +55,5 @@ HELP_BAU_BAU=§8/§ehelp bau §8- §7Hilfe zu nützlichen Werkzeugen HELP_BAU_BAU_HOVER=§eNützliche Zusatzfunktionen #PollresultCommand -POLLRESULT_HEADER=§e§lEs haben {0} abgestimmt auf die Frage: §f{1} -POLLRESULT_LIST=§e{0}. §7{1} mit {2} stimmen \ No newline at end of file +POLLRESULT_HEADER=§eEs haben {0} abgestimmt auf die Frage: §7{1} +POLLRESULT_LIST=§e{0}§8: §7{1} \ No newline at end of file