SteamWar/BungeeCore
Archiviert
13
2

Fix some stuff
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2023-01-03 18:22:19 +01:00
Ursprung b12e1ee1fa
Commit 9f6db3d639
2 geänderte Dateien mit 13 neuen und 13 gelöschten Zeilen

@ -1 +1 @@
Subproject commit c6da22f0bee3865b7b3283bc17275e12c5de14af Subproject commit bf480f6e6fc212362da34620385d4dee84250698

Datei anzeigen

@ -104,20 +104,20 @@ public class WhoisCommand extends SWCommand {
Team team = Team.get(user.getTeam()); 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()); 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(); 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<Mod> activeMods = Utils.playerModMap.get(user.getUuid()); List<Mod> activeMods = Utils.playerModMap.get(user.getUuid());
if(!activeMods.isEmpty()) { if (!activeMods.isEmpty()) {
Message.send("WHOIS_ACTIVE_MODS",player); Message.send("WHOIS_ACTIVE_MODS", player);
String result = activeMods.stream().map(mod -> "§" + mod.getModType().getColorCode() + mod.getModName()).collect(Collectors.joining("§8, ")); String result = activeMods.stream().map(mod -> "§" + mod.getModType().getColorCode() + mod.getModName()).collect(Collectors.joining("§8, "));
Message.send("WHOIS_ACTIVE_MOD", player,result); Message.send("WHOIS_ACTIVE_MOD", player, result);
}else { } else {
Message.send("WHOIS_NO_ACTIVE_MODS",player); Message.send("WHOIS_NO_ACTIVE_MODS", player);
} }
} }
@ -168,8 +168,8 @@ public class WhoisCommand extends SWCommand {
} }
private enum WhoisParameterTypes { private enum WhoisParameterTypes {
ALL(Arrays.asList("-a","-all"), UserGroup.Admin, UserGroup.Moderator, UserGroup.Developer, UserGroup.Supporter, UserGroup.Builder), 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); MOD(Arrays.asList("-m", "-mod", "-mods"), UserGroup.Admin, UserGroup.Moderator, UserGroup.Developer);
private final EnumSet<UserGroup> userGroupSet; private final EnumSet<UserGroup> userGroupSet;
@ -177,7 +177,7 @@ public class WhoisCommand extends SWCommand {
private List<String> tabCompletes; private List<String> tabCompletes;
WhoisParameterTypes(List<String> tabCompletes,UserGroup... userGroups) { WhoisParameterTypes(List<String> tabCompletes, UserGroup... userGroups) {
this.userGroupSet = EnumSet.copyOf(Arrays.asList(userGroups)); this.userGroupSet = EnumSet.copyOf(Arrays.asList(userGroups));
this.tabCompletes = tabCompletes; this.tabCompletes = tabCompletes;
} }