diff --git a/VelocityCore/src/de/steamwar/velocitycore/commands/TeamCommand.java b/VelocityCore/src/de/steamwar/velocitycore/commands/TeamCommand.java index 32b65e93..04225449 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/commands/TeamCommand.java +++ b/VelocityCore/src/de/steamwar/velocitycore/commands/TeamCommand.java @@ -478,6 +478,21 @@ public class TeamCommand extends SWCommand { } @Register("color") + public void color(@Validator("isLeader") PlayerChatter sender) { + Team team = Team.get(sender.user().getTeam()); + + if(notDuringEvent(sender)) + return; + + SWListInv inv = new SWListInv<>(sender, new Message("TEAM_COLOR_TITLE"), COLOR_CODES.entrySet().stream().map(entry -> new SWListInv.SWListEntry<>(new SWItem(new Message("PLAIN_STRING", "ยง" + entry.getKey() + team.getTeamKuerzel()), entry.getValue()), entry.getKey())).toList(), (click, element) -> {}); + inv.setCallback((click, element) -> { + inv.close(); + team.setTeamColor(element); + }); + inv.open(); + } + + @Register("changecolor") public void changeColor(@Validator("isLeader") PlayerChatter sender) { Team team = Team.get(sender.user().getTeam());