From 7cd4a5bac8ddd67eb141a735dcb7adf90f64b20c Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 13 May 2023 13:14:55 +0200 Subject: [PATCH] Update messages and cleanup RankCommand visual clutter --- .../steamwar/bungeecore/commands/RankCommand.java | 15 ++++++++------- src/de/steamwar/messages/BungeeCore.properties | 6 +++--- src/de/steamwar/messages/BungeeCore_de.properties | 6 +++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/RankCommand.java b/src/de/steamwar/bungeecore/commands/RankCommand.java index 9c506006..309fedb8 100644 --- a/src/de/steamwar/bungeecore/commands/RankCommand.java +++ b/src/de/steamwar/bungeecore/commands/RankCommand.java @@ -51,23 +51,24 @@ public class RankCommand extends SWCommand { return; } if (!player.getName().equals(s)) { - Message.send("RANK_PLAYER_FOUND", player, user.getUserName()); + Message.sendPrefixless("RANK_PLAYER_FOUND", player, user.getUserName()); } + for(ArenaMode mode : ArenaMode.getAllModes()) { if (!mode.isRanked()) continue; - Message.send("RANK_HEADER", player, mode.getChatName()); - Optional elo = UserElo.getElo(user.getId(), mode.getSchemType()); - + String eloString; if (elo.isPresent()) { int placement = UserElo.getPlacement(elo.get(), mode.getSchemType()); - Message.send("RANK_PLACED", player, placement, elo.get()); + eloString = Message.parse("RANK_PLACED", player, placement, elo.get()); } else { - Message.send("RANK_UNPLACED", player); + eloString = Message.parse("RANK_UNPLACED", player); } - Message.send("RANK_EMBLEM", player, UserElo.getEmblemProgression(mode.getChatName(), user.getId())); + + Message.sendPrefixless("RANK_HEADER", player, mode.getChatName(), eloString); + Message.sendPrefixless("RANK_EMBLEM", player, UserElo.getEmblemProgression(mode.getChatName(), user.getId())); } } diff --git a/src/de/steamwar/messages/BungeeCore.properties b/src/de/steamwar/messages/BungeeCore.properties index 3a1feafd..9a3b8ae7 100644 --- a/src/de/steamwar/messages/BungeeCore.properties +++ b/src/de/steamwar/messages/BungeeCore.properties @@ -638,10 +638,10 @@ ARENA_NOT_FOUND=§cThe specified arena could not be found #Rank RANK_PLAYER_NOT_FOUND=§cPlayer not found RANK_PLAYER_FOUND=§eRank §7of §e{0} -RANK_HEADER=§7§lMode {0} -RANK_UNPLACED=§eunranked +RANK_HEADER=§e{0} {1} +RANK_UNPLACED=§7unranked RANK_PLACED=§e{0}§8. §7with §e{1} §7Elo§8. -RANK_EMBLEM=§eEmblem§8: {0} +RANK_EMBLEM=§7Emblem§8: {0} #Fabric Mod Sender MODIFICATION_BAN_MESSAGE=You tried to bypass / modify the FabricModSender! diff --git a/src/de/steamwar/messages/BungeeCore_de.properties b/src/de/steamwar/messages/BungeeCore_de.properties index 97c4d535..5f92f3a8 100644 --- a/src/de/steamwar/messages/BungeeCore_de.properties +++ b/src/de/steamwar/messages/BungeeCore_de.properties @@ -615,10 +615,10 @@ ARENA_NOT_FOUND=§cDie angegebene Arena konnte nicht gefunden werden #Rank RANK_PLAYER_NOT_FOUND=§cSpieler nicht gefunden RANK_PLAYER_FOUND=§eRang §7von §e{0} -RANK_HEADER=§7§lModus {0} -RANK_UNPLACED=§eunplatziert +RANK_HEADER=§e{0} {1} +RANK_UNPLACED=§7unplatziert RANK_PLACED=§e{0}§8. §7mit §e{1} §7Elo§8. -RANK_EMBLEM=§eEmblem§8: {0} +RANK_EMBLEM=§7Emblem§8: {0} #Fabric Mod Sender MODIFICATION_BAN_MESSAGE=Du hast probiert den FabricModSender zu umgehen / zu modifizieren!