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
+4
@@ -707,12 +707,16 @@ public class DataManager {
} }
public static TeleportationPoint getPlayerOfflinePosition(int playerID, Connection connection) throws SQLException { public static TeleportationPoint getPlayerOfflinePosition(int playerID, Connection connection) throws SQLException {
try {
Integer locationID = getPlayerInteger(playerID, "offline_location_id", connection); Integer locationID = getPlayerInteger(playerID, "offline_location_id", connection);
if (locationID != null) { if (locationID != null) {
return getTeleportationPoint(locationID, connection); return getTeleportationPoint(locationID, connection);
} else { } else {
return null; return null;
} }
} catch (IllegalArgumentException e) {
return null;
}
} }
// Insert a teleportation point, returns generated id // Insert a teleportation point, returns generated id