Lobby + Rooms with different game modes

I’m currently stuck on ideas of how to make multiple rooms with different modes like tdm and dm. I currently have 1 Room/World where I loop through entities and update them, I handle collisions inside the entity’s class so for example Bullet. The bullet would need to hit all players in a DM but when playing TDM it shouldn’t hit teammates. I don’t like the idea of putting if statements in Bullet in this case to check what mode I’m playing and what it should hit.