geforkt von SteamWar/BungeeCore
Update RankCommand
Dieser Commit ist enthalten in:
Ursprung
5bcd094080
Commit
0d888dff1c
@ -64,7 +64,7 @@ public class RankCommand extends BasicCommand {
|
|||||||
} else {
|
} else {
|
||||||
Message.send("RANK_UNPLACED", player);
|
Message.send("RANK_UNPLACED", player);
|
||||||
}
|
}
|
||||||
Message.send("RANK_EMBLEM", player, UserElo.getEmblemProgression(mode.getChatName(), user.getId()));
|
Message.send("RANK_EMBLEM", player, UserElo.getEmblemProgression(player, mode.getChatName(), user.getId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
package de.steamwar.bungeecore.sql;
|
package de.steamwar.bungeecore.sql;
|
||||||
|
|
||||||
import de.steamwar.bungeecore.ArenaMode;
|
import de.steamwar.bungeecore.ArenaMode;
|
||||||
|
import de.steamwar.bungeecore.Message;
|
||||||
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -138,8 +140,11 @@ public class UserElo {
|
|||||||
return "§7✧ ";
|
return "§7✧ ";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getEmblemProgression(String gameMode, int userId) {
|
public static String getEmblemProgression(ProxiedPlayer player, String gameMode, int userId) {
|
||||||
if (UserElo.getFightsOfSeason(userId, gameMode) < 10) return "§8✧ ✦ ✶ ✷ ✸ ✹ ❂";
|
int fightsOfSeason = getFightsOfSeason(userId, gameMode);
|
||||||
|
if (fightsOfSeason < 10) {
|
||||||
|
return Message.parse("RANK_NEEDED_FIGHTS_LEFT", player, "§8✧ ✦ ✶ ✷ ✸ ✹ ❂", 11 - fightsOfSeason);
|
||||||
|
}
|
||||||
Optional<Integer> currentElo = UserElo.getElo(userId, gameMode);
|
Optional<Integer> currentElo = UserElo.getElo(userId, gameMode);
|
||||||
if (!currentElo.isPresent()) return "§8✧ ✦ ✶ ✷ ✸ ✹ ❂";
|
if (!currentElo.isPresent()) return "§8✧ ✦ ✶ ✷ ✸ ✹ ❂";
|
||||||
int maxEloOfGameMode = UserElo.getMaxElo(gameMode);
|
int maxEloOfGameMode = UserElo.getMaxElo(gameMode);
|
||||||
|
@ -569,3 +569,4 @@ RANK_HEADER=§7§lModus {0}
|
|||||||
RANK_UNPLACED=§eunplatziert
|
RANK_UNPLACED=§eunplatziert
|
||||||
RANK_PLACED=§e{0}§8. §7mit §e{1} §7Elo§8.
|
RANK_PLACED=§e{0}§8. §7mit §e{1} §7Elo§8.
|
||||||
RANK_EMBLEM=§eEmblem§8: {0}
|
RANK_EMBLEM=§eEmblem§8: {0}
|
||||||
|
RANK_NEEDED_FIGHTS_LEFT={0} §8(§7noch §e{1}§7 Fights nötig§8)
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren