mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-04 22:16:22 +00:00
Fix IllegalArgumentException when returning to a last position that has not been defined yet
This commit is contained in:
1 parent
97df373fbb
commit
5b6976b652
1 file changed
+5
@@ -86,6 +86,7 @@ public class TeleportManager {
|
||||
}
|
||||
|
||||
public static void queueBackTeleport(Player player, Connection connection) throws SQLException {
|
||||
try {
|
||||
TeleportationPoint lastPosition = DataManager.getPlayerLastPosition(player, connection);
|
||||
if (lastPosition != null) {
|
||||
if (HuskHomes.getSettings().doEconomy()) {
|
||||
@@ -113,6 +114,10 @@ public class TeleportManager {
|
||||
} else {
|
||||
MessageManager.sendMessage(player, "error_no_last_position");
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
MessageManager.sendMessage(player, "error_no_last_position");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void queueRandomTeleport(Player player, Connection connection) throws SQLException {
|
||||
|
||||
Reference in new issue
Block a user