From 82e97935d9c146b26feb20365cdd8707b94aa166 Mon Sep 17 00:00:00 2001 From: Kam Date: Thu, 28 Aug 2025 22:18:16 -0400 Subject: [PATCH] fix: preserve profile data on relog --- .../java/kamkeel/npcs/controllers/ProfileController.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/kamkeel/npcs/controllers/ProfileController.java b/src/main/java/kamkeel/npcs/controllers/ProfileController.java index 3e874ab1c..ceb138285 100644 --- a/src/main/java/kamkeel/npcs/controllers/ProfileController.java +++ b/src/main/java/kamkeel/npcs/controllers/ProfileController.java @@ -138,9 +138,16 @@ public class ProfileController implements IProfileHandler { if (!profile.getSlots().containsKey(profile.currentSlotId)) { profile.currentSlotId = 0; } + profile.player = player; activeProfiles.put(player.getUniqueID(), profile); - loadSlotData(player); + + PlayerData pdata = PlayerData.get(player); + if (profile.getSlots().containsKey(pdata.profileSlot)) { + profile.currentSlotId = pdata.profileSlot; + } + + saveSlotData(player); verifySlotQuests(profile.player); } }