From 9f6db3d639c624c67d9ebaf5cc907e717c7110dd Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 3 Jan 2023 18:22:19 +0100 Subject: [PATCH] Fix some stuff --- CommonCore | 2 +- .../bungeecore/commands/WhoisCommand.java | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CommonCore b/CommonCore index c6da22f..bf480f6 160000 --- a/CommonCore +++ b/CommonCore @@ -1 +1 @@ -Subproject commit c6da22f0bee3865b7b3283bc17275e12c5de14af +Subproject commit bf480f6e6fc212362da34620385d4dee84250698 diff --git a/src/de/steamwar/bungeecore/commands/WhoisCommand.java b/src/de/steamwar/bungeecore/commands/WhoisCommand.java index 9c426e9..6cd2570 100644 --- a/src/de/steamwar/bungeecore/commands/WhoisCommand.java +++ b/src/de/steamwar/bungeecore/commands/WhoisCommand.java @@ -104,20 +104,20 @@ public class WhoisCommand extends SWCommand { Team team = Team.get(user.getTeam()); Message.send("WHOIS_TEAM", player, Message.parse("WHOIS_TEAM_HOVER", player, team.getTeamName()), new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/team info " + team.getTeamKuerzel()), team.getTeamColor(), team.getTeamKuerzel(), team.getTeamName()); - if(Utils.playerModMap.containsKey(user.getUuid())) { + if (Utils.playerModMap.containsKey(user.getUuid())) { Mod.Platform modPlatform = Utils.playerModMap.get(user.getUuid()).get(0).getPlatform(); - Message.send("WHOIS_PLATFORM",player,modPlatform.toString()); + Message.send("WHOIS_PLATFORM", player, modPlatform.toString()); } - if(parameterTypes.contains(WhoisParameterTypes.MOD)) { + if (parameterTypes.contains(WhoisParameterTypes.MOD)) { List activeMods = Utils.playerModMap.get(user.getUuid()); - if(!activeMods.isEmpty()) { - Message.send("WHOIS_ACTIVE_MODS",player); - String result = activeMods.stream().map(mod -> "§" + mod.getModType().getColorCode() + mod.getModName()).collect(Collectors.joining("§8, ")); - Message.send("WHOIS_ACTIVE_MOD", player,result); - }else { - Message.send("WHOIS_NO_ACTIVE_MODS",player); + if (!activeMods.isEmpty()) { + Message.send("WHOIS_ACTIVE_MODS", player); + String result = activeMods.stream().map(mod -> "§" + mod.getModType().getColorCode() + mod.getModName()).collect(Collectors.joining("§8, ")); + Message.send("WHOIS_ACTIVE_MOD", player, result); + } else { + Message.send("WHOIS_NO_ACTIVE_MODS", player); } } @@ -168,8 +168,8 @@ public class WhoisCommand extends SWCommand { } private enum WhoisParameterTypes { - ALL(Arrays.asList("-a","-all"), UserGroup.Admin, UserGroup.Moderator, UserGroup.Developer, UserGroup.Supporter, UserGroup.Builder), - MOD(Arrays.asList("-m","-mod","-mods"), UserGroup.Admin, UserGroup.Moderator, UserGroup.Developer); + ALL(Arrays.asList("-a", "-all"), UserGroup.Admin, UserGroup.Moderator, UserGroup.Developer, UserGroup.Supporter, UserGroup.Builder), + MOD(Arrays.asList("-m", "-mod", "-mods"), UserGroup.Admin, UserGroup.Moderator, UserGroup.Developer); private final EnumSet userGroupSet; @@ -177,7 +177,7 @@ public class WhoisCommand extends SWCommand { private List tabCompletes; - WhoisParameterTypes(List tabCompletes,UserGroup... userGroups) { + WhoisParameterTypes(List tabCompletes, UserGroup... userGroups) { this.userGroupSet = EnumSet.copyOf(Arrays.asList(userGroups)); this.tabCompletes = tabCompletes; }