Skip to content

Commit

Permalink
Fixed getting the teleportation failed message even when teleportatio…
Browse files Browse the repository at this point in the history
…n is successful
  • Loading branch information
OmerBenGera committed Jan 5, 2022
1 parent 9030762 commit 9e993d5
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -319,7 +319,7 @@ public void teleport(Location location, @Nullable Consumer<Boolean> teleportResu
if (player != null) {
playerTeleportAlgorithm.teleport(player, location).whenComplete((result, error) -> {
if (teleportResult != null)
teleportResult.accept(error != null && result);
teleportResult.accept(error == null && result);
});
} else if (teleportResult != null) {
teleportResult.accept(false);
Expand All @@ -337,7 +337,7 @@ public void teleport(Island island, @Nullable Consumer<Boolean> teleportResult)
if (player != null) {
playerTeleportAlgorithm.teleport(player, island).whenComplete((result, error) -> {
if (teleportResult != null)
teleportResult.accept(error != null && result);
teleportResult.accept(error == null && result);
});
} else if (teleportResult != null) {
teleportResult.accept(false);
Expand Down

0 comments on commit 9e993d5

Please sign in to comment.