Skip to content

Commit 6d51ac6

Browse files
committed
Migrate Floodgate players at join time to v2 database
1 parent a6e4fc4 commit 6d51ac6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

core/src/main/java/com/github/games647/fastlogin/core/shared/FloodgateManagement.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,15 @@ public void run() {
8686
profile.setFloodgate(true);
8787
}
8888
} else if (!profile.isFloodgate() && !isLinked) {
89-
core.getPlugin().getLog().warn("Player {} is already stored by FastLogin as a Java Edition player.",
90-
username);
91-
return;
89+
if (profile.getDbVersion() == 1) {
90+
profile.setFloodgate(true);
91+
core.getPlugin().getLog().info(
92+
"Player {} has been migrated to the v2 database schema as a Floodgate user.", username);
93+
} else {
94+
core.getPlugin().getLog().warn("Player {} is already stored by FastLogin as a Java Edition player.",
95+
username);
96+
return;
97+
}
9298
} else if (profile.isFloodgate() && isLinked) {
9399
core.getPlugin().getLog()
94100
.warn("Player {} is already stored by FastLogin as a non-linked Bedrock Edition player.", username);

0 commit comments

Comments
 (0)