Skip to content

Commit b9e2472

Browse files
committed
Dont try to get system data that doesnt exist on player join
1 parent 33f8c6f commit b9e2472

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/com/gmail/kurumitk78/systemswap/SystemSwap.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ public static void deleteSystemSystemUUID(UUID systemUUID){
7676

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

0 commit comments

Comments
 (0)