public static Packet unpackPacket(SocketAddress address, short id, ByteBuffer data){
        switch (id){
            case 1: return new RegisterUserPacket(address, data.array());
            case 2: return new GetUserPacket(address, data.array());
            case 3: return new GetUsersPacket(address);
            case 4: return new RespUserPacket(address, data.array());
            case 5: return new RespUsersPacket(address, data.array());
            default: throw new IllegalArgumentException("Received unknown PacketID: " + id);
        }
    }