use teleportUniform in Build
This commit is contained in:
parent
16905240e9
commit
bef403a72c
@ -823,22 +823,7 @@ public class Build extends Game
|
||||
|
||||
Player[] players = UtilServer.getPlayers();
|
||||
|
||||
// Find the number of spaces between each player,
|
||||
int spacesBetween = Math.max(Math.floorDiv(edgeLocations.size(), players.length), 1);
|
||||
int spaceIndex = 0;
|
||||
|
||||
// Teleport the players to locations every [spacesBetween] spaces
|
||||
for (Player player : players)
|
||||
{
|
||||
teleportPlayer(player, edgeLocations.get(spaceIndex));
|
||||
|
||||
spaceIndex += spacesBetween;
|
||||
|
||||
if (spaceIndex > edgeLocations.size())
|
||||
{
|
||||
spaceIndex = 0;
|
||||
}
|
||||
}
|
||||
UtilPlayer.teleportUniform(Arrays.asList(players), edgeLocations, this::teleportPlayer);
|
||||
}
|
||||
|
||||
public BuildData getBuildData(Player player)
|
||||
|
Loading…
Reference in New Issue
Block a user