private PacketContainer newTeamMemberUpdatePacket(String player, MemberAction action) {
        // http://wiki.vg/Protocol#Teams
        PacketContainer packet = new PacketContainer(PacketType.Play.Server.SCOREBOARD_TEAM);

        // set team name - 	String (16)
        packet.getStrings().write(0, getId());

        // set mode
        switch (action) {
            case ADD:
                packet.getIntegers().write(GTEQ_1_13 ? 0 : 1, UpdateType.ADD_PLAYERS.getCode());
                break;
            case REMOVE:
                packet.getIntegers().write(GTEQ_1_13 ? 0 : 1, UpdateType.REMOVE_PLAYERS.getCode());
                break;
            default:
                throw new RuntimeException();
        }

        // set players - Array of String (40)
        packet.getSpecificModifier(Collection.class).write(0, Collections.singletonList(player));
        
        return packet;
    }
Creates a new scoreboard team

@param id the id of this team
@param displayName the initial display name
helper/src/main/java/me/lucko/helper/scoreboard/PacketScoreboardTeam.java