package server.command;

import io.netty.channel.Channel;
import proto.Command.LobbyCmd;
import server.lobby.Lobby;

public class Team implements ILobbyCommand {

    @Override
    public void run(Channel channel, LobbyCmd cmd, CommandManager commandManager) throws Exception {
        if (commandManager.getLobbyManager().getWaitingPlayers().containsKey(channel)) {
            throw new Exception();
        }
        Lobby lobby = commandManager.getLobbyManager().getLobbyByChannel(channel);
    }

}

@@ -498,24 +498,84 @@
 (channel);%0D%0A
+        lobby.getActualState().handleAction(channel, cmd);%0D%0A
     %7D%0D%0A%0D%0A%7D%0D%0A

Handle Teams server-side with full team checks.