Add PollCommand MultiLang
Dieser Commit ist enthalten in:
Ursprung
34a4030f80
Commit
25885bd65c
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
package de.steamwar.bungeecore.commands;
|
package de.steamwar.bungeecore.commands;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.BungeeCore;
|
import de.steamwar.bungeecore.Message;
|
||||||
import de.steamwar.bungeecore.listeners.PollSystem;
|
import de.steamwar.bungeecore.listeners.PollSystem;
|
||||||
import de.steamwar.bungeecore.sql.PollAnswer;
|
import de.steamwar.bungeecore.sql.PollAnswer;
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
import de.steamwar.bungeecore.sql.SteamwarUser;
|
||||||
@ -40,7 +40,7 @@ public class PollCommand extends BasicCommand {
|
|||||||
ProxiedPlayer player = (ProxiedPlayer) sender;
|
ProxiedPlayer player = (ProxiedPlayer) sender;
|
||||||
|
|
||||||
if(PollSystem.noCurrentPoll()){
|
if(PollSystem.noCurrentPoll()){
|
||||||
BungeeCore.send(player, "§cDerzeit läuft keine Umfrage.");
|
Message.send("POLL_NO_POLL", player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,15 +55,15 @@ public class PollCommand extends BasicCommand {
|
|||||||
if(answer < 1 || answer > PollSystem.answers())
|
if(answer < 1 || answer > PollSystem.answers())
|
||||||
throw new NumberFormatException();
|
throw new NumberFormatException();
|
||||||
}catch(NumberFormatException e){
|
}catch(NumberFormatException e){
|
||||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§cDas ist keine Antwortmöglichkeit!");
|
Message.send("POLL_NO_ANSWER", player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PollAnswer pollAnswer = PollAnswer.get(SteamwarUser.get(player.getUniqueId()).getId());
|
PollAnswer pollAnswer = PollAnswer.get(SteamwarUser.get(player.getUniqueId()).getId());
|
||||||
if(pollAnswer.hasAnswered())
|
if(pollAnswer.hasAnswered())
|
||||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§aDeine Antwort wurde aktualisiert");
|
Message.send("POLL_ANSWER_REFRESH", player);
|
||||||
else
|
else
|
||||||
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§aDeine Antwort wurde registriert");
|
Message.send("POLL_ANSWER_NEW", player);
|
||||||
|
|
||||||
pollAnswer.setAnswer(answer);
|
pollAnswer.setAnswer(answer);
|
||||||
}
|
}
|
||||||
|
@ -237,4 +237,10 @@ MSG_SELF=§cNachrichten an dich selbst hast du wirklich nicht nötig!
|
|||||||
MSG_FORMAT=§e{0}§8»§e{1} §r§7{2}
|
MSG_FORMAT=§e{0}§8»§e{1} §r§7{2}
|
||||||
|
|
||||||
#PingCommand
|
#PingCommand
|
||||||
PING_RESPONSE=§7Dein Ping beträgt §c{0}§r§7 ms!
|
PING_RESPONSE=§7Dein Ping beträgt §c{0}§r§7 ms!
|
||||||
|
|
||||||
|
#PollCommand
|
||||||
|
POLL_NO_POLL=§cDerzeit läuft keine Umfrage.
|
||||||
|
POLL_NO_ANSWER=§cDas ist keine Antwortmöglichkeit!
|
||||||
|
POLL_ANSWER_REFRESH=§aDeine Antwort wurde aktualisiert
|
||||||
|
POLL_ANSWER_NEW=§aDeine Antwort wurde registriert
|
In neuem Issue referenzieren
Einen Benutzer sperren