File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
core/src/main/java/com/github/games647/fastlogin/core/shared Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,13 @@ public void run() {
167167 return ;
168168 }
169169
170+ // Set the UUID for the player login from floodgate.
171+ if (isLinked && profile .isOnlinemodePreferred ()) {
172+ profile .setId (floodgatePlayer .getCorrectUniqueId ());
173+ core .getPlugin ().getLog ().info (
174+ "Player {} login as a Floodgate linked premium user (UUID: {})" ,
175+ username , floodgatePlayer .getCorrectUniqueId ());
176+ }
170177 //start Bukkit/Bungee specific tasks
171178 startLogin ();
172179
Original file line number Diff line number Diff line change @@ -80,7 +80,13 @@ public void run() {
8080 if (success ) {
8181 //update only on success to prevent corrupt data
8282 if (playerProfile != null ) {
83- playerProfile .setId (session .getUuid ());
83+ if (session .getUuid () == null ) {
84+ // Set session ID from floodgatePlayer.getCorrectUniqueId()
85+ session .setUuid (playerProfile .getId ());
86+ } else {
87+ // Set player UUID to session UUID
88+ playerProfile .setId (session .getUuid ());
89+ }
8490 playerProfile .setOnlinemodePreferred (true );
8591 storage .save (playerProfile );
8692 }
You can’t perform that action at this time.
0 commit comments