Catch IllegalArgumentException

Signed-off-by: BuildTools <[email protected]>
This commit is contained in:
BuildTools committed 2021-07-12 23:33:02 +03:00
1 parent 541f85596b
commit 725d3d964b
1 file changed
+8 -4
@@ -707,10 +707,14 @@ public class DataManager {
}
public static TeleportationPoint getPlayerOfflinePosition(int playerID, Connection connection) throws SQLException {
Integer locationID = getPlayerInteger(playerID, "offline_location_id", connection);
if (locationID != null) {
return getTeleportationPoint(locationID, connection);
} else {
try {
Integer locationID = getPlayerInteger(playerID, "offline_location_id", connection);
if (locationID != null) {
return getTeleportationPoint(locationID, connection);
} else {
return null;
}
} catch (IllegalArgumentException e) {
return null;
}
}