9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-23 00:29:18 +00:00

feat: improve data syncing with checkin petitions

This improves data fetching speed in cases where a user logs out during sync application; when they log back in, the server will petition the server they are checked out on to check them out.

We also now unlock users after saving sync on a server to accommodate this, and track user disconnection status to avoid inconsistencies with what platforms return for `isOnline`
This commit is contained in:
William278
2025-03-23 16:15:00 +00:00
parent ef7b3c4f32
commit 937ea9bc8e
17 changed files with 223 additions and 85 deletions

View File

@@ -99,6 +99,7 @@ public class BukkitHuskSync extends JavaPlugin implements HuskSync, BukkitTask.S
private final Map<Integer, MapView> mapViews = Maps.newConcurrentMap();
private final List<Migrator> availableMigrators = Lists.newArrayList();
private final Set<UUID> lockedPlayers = Sets.newConcurrentHashSet();
private final Set<UUID> disconnectingPlayers = Sets.newConcurrentHashSet();
private boolean disabling;
private Gson gson;