diff --git a/Spigot/src/main/java/me/darkeyedragon/randomtp/world/PlayerSpigot.java b/Spigot/src/main/java/me/darkeyedragon/randomtp/world/PlayerSpigot.java index 5c62ffe..2a412a2 100644 --- a/Spigot/src/main/java/me/darkeyedragon/randomtp/world/PlayerSpigot.java +++ b/Spigot/src/main/java/me/darkeyedragon/randomtp/world/PlayerSpigot.java @@ -56,13 +56,7 @@ public RandomLocation getEyeLocation() { @Override public CompletableFuture teleportAsync(RandomLocation location) { //Teleport the player async if possible - return PaperLib.teleportAsync(player, WorldUtil.toLocation(location)).thenApply(success -> { - if (success) { - return new BasicTeleportResponse(TeleportType.SUCCESS); - } else { - return new BasicTeleportResponse(TeleportType.FAIL); - } - }); + return PaperLib.teleportAsync(player, WorldUtil.toLocation(location)).thenApply(success -> success ? new BasicTeleportResponse(TeleportType.SUCCESS) : new BasicTeleportResponse(TeleportType.FAIL)); } @Override