Make entity belong to player.
entity
player
void setPlayer(int entity, String player) { _playerByEntity[entity] = player; _entitiesByPlayer.putIfAbsent(player, Bag<int>.new).add(entity); }