how would i check to see if every player on the server is in a certain gamemode

Started by faketruthss on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Sep 2023
Points:
172

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
how would i check to see if every player on the server is in a certain gamemode

so i have an idea where i want to make it where if u die u are set to spectator and once everyone dies on a certain team it would check to see if that team is all in spectator then it would kill the other team and then respawn them all at once in survival in a different place. if anyone knows how to achieve this please let me know

Active 10 months ago
Joined Jun 2023
Points:
321

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 174
Under the "world" tab, there…
Sat, 09/23/2023 - 17:57

Under the "world" tab, there should be a "for each player in the wold as (entity iterator) do {your code}"