Dieser Commit ist enthalten in:
Ursprung
9ec6ea5090
Commit
750cf0ee97
@ -116,7 +116,6 @@ public class BungeeCore extends Plugin {
|
|||||||
new BugCommand();
|
new BugCommand();
|
||||||
new WhoisCommand();
|
new WhoisCommand();
|
||||||
new RegelnCommand();
|
new RegelnCommand();
|
||||||
new RankCommand();
|
|
||||||
new IgnoreCommand();
|
new IgnoreCommand();
|
||||||
new UnIgnoreCommand();
|
new UnIgnoreCommand();
|
||||||
new PollresultCommand();
|
new PollresultCommand();
|
||||||
|
@ -1,68 +0,0 @@
|
|||||||
/*
|
|
||||||
This file is a part of the SteamWar software.
|
|
||||||
|
|
||||||
Copyright (C) 2020 SteamWar.de-Serverteam
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.steamwar.bungeecore.commands;
|
|
||||||
|
|
||||||
import de.steamwar.bungeecore.ArenaMode;
|
|
||||||
import de.steamwar.bungeecore.Message;
|
|
||||||
import de.steamwar.bungeecore.sql.Elo;
|
|
||||||
import de.steamwar.bungeecore.sql.Season;
|
|
||||||
import de.steamwar.bungeecore.sql.SteamwarUser;
|
|
||||||
import net.md_5.bungee.api.CommandSender;
|
|
||||||
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class RankCommand extends BasicCommand {
|
|
||||||
public RankCommand() {
|
|
||||||
super("rank", null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute(CommandSender sender, String[] args) {
|
|
||||||
if(!(sender instanceof ProxiedPlayer))
|
|
||||||
return;
|
|
||||||
|
|
||||||
ProxiedPlayer player = (ProxiedPlayer) sender;
|
|
||||||
Message.send("RANK_HEADER", player, Season.convertSeasonToString(Season.getSeason()));
|
|
||||||
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
|
||||||
for(ArenaMode mode : ArenaMode.getAllModes()){
|
|
||||||
if(!mode.isRanked())
|
|
||||||
continue;
|
|
||||||
int elo = Elo.getElo(user.getId(), mode.getSchemType());
|
|
||||||
int placement = Elo.getPlacement(elo, mode.getSchemType());
|
|
||||||
|
|
||||||
if(placement == -1)
|
|
||||||
Message.send("RANK_UNPLACED", player, mode.getChatName());
|
|
||||||
else
|
|
||||||
Message.send("RANK_PLACED", player, mode.getChatName(), placement, elo);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Iterable<String> onTabComplete(CommandSender commandSender, String[] args) {
|
|
||||||
if(args.length > 1)
|
|
||||||
return new ArrayList<>();
|
|
||||||
|
|
||||||
List<String> result = ArenaMode.getAllRankedChatNames();
|
|
||||||
result.removeIf(name -> !name.startsWith(args[0]));
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
@ -301,20 +301,6 @@ POLL_NO_ANSWER=§cDas ist keine Antwortmöglichkeit!
|
|||||||
POLL_ANSWER_REFRESH=§aDeine Antwort wurde aktualisiert.
|
POLL_ANSWER_REFRESH=§aDeine Antwort wurde aktualisiert.
|
||||||
POLL_ANSWER_NEW=§aDeine Antwort wurde registriert.
|
POLL_ANSWER_NEW=§aDeine Antwort wurde registriert.
|
||||||
|
|
||||||
#RankCommand
|
|
||||||
RANK_HEADER=§7§lPlatzierungen {0}
|
|
||||||
RANK_UNPLACED=§7{0}§8: §eunplatziert
|
|
||||||
RANK_PLACED=§7{0}§8: §e{1}§8. §7mit §e{2} §7Elo§8.
|
|
||||||
|
|
||||||
#RankedCommand
|
|
||||||
RANKED_NO_RANKED_MODE=§cDieser Spielmodus ist nicht für Ranglistenspiele freigeschalten.
|
|
||||||
RANKED_QUEUE_JOINED=§aRanglistenspiel-Warteschlange betreten.
|
|
||||||
RANKED_QUEUE_HOW_TO_LEAVE=§7Wiederhole den Befehl zum Verlassen der Warteschlange.
|
|
||||||
RANKED_QUEUE_LEFT=§cRanglistenspiel-Warteschlange verlassen.
|
|
||||||
RANKED_ENEMY_SPOTTED=§eGegner gefunden! Ranglistenspiel startet.
|
|
||||||
RANKED_BROADCAST=§7{0}§8-§7Ranglistenspiel§8: §e{1} vs {2}
|
|
||||||
RANKED_BROADCAST_HOVER=§aZuschauen
|
|
||||||
|
|
||||||
#RCommand
|
#RCommand
|
||||||
R_USAGE=§8/§7r §8[§eAntwort§8]
|
R_USAGE=§8/§7r §8[§eAntwort§8]
|
||||||
R_NOTHING=§cDu hast bisher mit niemandem geschrieben!
|
R_NOTHING=§cDu hast bisher mit niemandem geschrieben!
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren