There is not a problem with my code, I would just like to know if sending custom objects in an ArrayList was possible with Kryonet. For example, my game is an MMORPG and there are different maps. When a client requests a map from the server, I would like the return map packet to have an ArrayList of players and entities on the map. is that possible?
Sample Map Packet:
public class MapDataPacket{
ArrayList<Player> PlayerList = new ArrayList<Player>();
ArrayList<Entity> EntityList = new ArrayList<Entity>();
int map_id;
int[][] tiles;
//etc...
}
If this is not possible, how would I go about doing this?