Code:java public String getNextMap (List<String> maps) { if (maps != null && !maps.isEmpty()) { Collections.shuffle(maps); return maps.iterator().next(); } return null;}
You will need to create "arenas". Basically, you need to have the maps premade and put in locations throughout your world. Get the coords of the spawnpoints and if the map is selected, it teleports the players to that arena. Basically you can make a method for each different map, with all the spawn points and whatever else you need, such as teleports etc.
That actually doesn't explain anything... If I'm understanding you correctly, hivemc.eu actually using hundreds of servers and bungeecord to switch people between them for the arenas. In the ideal world, people shouldn't be able to manage that, so use multi world. Try my minigame tutorial in the resources section.