Add kick option for players already online

This commit is contained in:
3944Realms 2026-02-06 11:02:04 +08:00 committed by GitHub
parent a367eb0e3e
commit 1c5f3cddd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -169,7 +169,7 @@ public class VanillaSync {
}
// Second query: Check if player is already online on another server
if (online && lastServer != JdbcConfig.SERVER_ID.get()) {
if (JdbcConfig.KICK_WHEN_ALREADY_ONLINE.get() && online && lastServer != JdbcConfig.SERVER_ID.get()) {
JDBCsetUp.QueryResult qr2 = JDBCsetUp.executeQuery("SELECT last_update,enable FROM server_info WHERE id='" + lastServer + "'");
try (ResultSet rs2 = qr2.resultSet()) {
if (rs2.next()) {
@ -843,4 +843,4 @@ public class VanillaSync {
CuriosCache.tryStoreCuriosToCache(player);
}
}
}
}