Add handling for TeleportExceptions thrown when completing TimedTeleports

This commit is contained in:
William committed 2023-05-05 23:48:59 +01:00
1 parent daa72182f8
commit 28ab6d4a87
5 files changed
+31 -20

No files matched your search

@@ -23,6 +23,7 @@ import com.zaxxer.hikari.HikariDataSource;
import net.william278.huskhomes.HuskHomes;
import net.william278.huskhomes.position.*;
import net.william278.huskhomes.teleport.Teleport;
import net.william278.huskhomes.teleport.TeleportationException;
import net.william278.huskhomes.user.OnlineUser;
import net.william278.huskhomes.user.SavedUser;
import net.william278.huskhomes.user.User;
@@ -592,6 +593,8 @@ public class MySqlDatabase extends Database {
}
} catch (SQLException e) {
plugin.log(Level.SEVERE, "Failed to query the current teleport of " + onlineUser.getUsername(), e);
} catch (TeleportationException e) {
e.displayMessage(onlineUser, plugin);
}
return Optional.empty();
}