Invert If statment

This commit is contained in:
Fabrizio La Rosa 2020-06-12 23:43:32 +02:00
parent a61b3063aa
commit 3ab5bd3e76

View File

@ -180,10 +180,10 @@ public class Move implements Listener {
}
private void teleportPlayerToIslandSpawn(Player player, IslandWorld world, Island island) {
if (island.getVisit().isVisitor(player.getUniqueId())) {
player.teleport(island.getLocation(world, IslandEnvironment.Visitor));
} else {
if (!island.getVisit().isVisitor(player.getUniqueId())) {
player.teleport(island.getLocation(world, IslandEnvironment.Main));
} else {
player.teleport(island.getLocation(world, IslandEnvironment.Visitor));
}
}