Dieser Commit ist enthalten in:
Ursprung
b12e1ee1fa
Commit
9f6db3d639
@ -1 +1 @@
|
|||||||
Subproject commit c6da22f0bee3865b7b3283bc17275e12c5de14af
|
Subproject commit bf480f6e6fc212362da34620385d4dee84250698
|
@ -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;
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren