Skip to content

Commit

Permalink
Dont try to get system data that doesnt exist on player join
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurumi78 committed Oct 21, 2024
1 parent 33f8c6f commit b9e2472
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/gmail/kurumitk78/systemswap/SystemSwap.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ public static void deleteSystemSystemUUID(UUID systemUUID){

public static void initPlayerSystem(ResultSet playerData, UUID playerUUID) throws SQLException {
UUID systemUUID;
if(playerData.getString("systemUUID") == null){
playerData.close();
return; //This should only ever happen if the player isnt a system.
}
systemUUID = UUID.fromString(playerData.getString("systemUUID"));
playerData.close();
ResultSet alterData = SQLiteHandler.dbCallReturn("SELECT * FROM alters WHERE systemUUID = '" +systemUUID + "';");
Expand Down

0 comments on commit b9e2472

Please sign in to comment.