use of com.massivecraft.massivecore.store.SenderColl in project MassiveCore by MassiveCraft.
the class EngineMassiveCoreDatabase method massiveStoreLoginSync.
// Can not be cancelled.
@EventHandler(priority = EventPriority.LOWEST)
public void massiveStoreLoginSync(PlayerLoginEvent event) {
// Get player id ...
Player player = event.getPlayer();
if (MUtil.isntPlayer(player))
return;
final String playerId = player.getUniqueId().toString();
// ... get remote entries ...
Map<SenderColl<?>, Entry<JsonObject, Long>> remoteEntries = getRemoteEntries(playerId);
// ... and sync each of them.
for (Entry<SenderColl<?>, Entry<JsonObject, Long>> entry : remoteEntries.entrySet()) {
SenderColl<?> coll = entry.getKey();
Entry<JsonObject, Long> remoteEntry = entry.getValue();
coll.syncId(playerId, null, remoteEntry);
}
}
Aggregations