mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 06:57:39 +01:00
Fix roles/groups not being removed instantly upon unlink
This commit is contained in:
parent
d67dd46cdc
commit
03ed9a5b41
@ -77,10 +77,11 @@ public class AccountLinkManager implements IEssentialsModule, DiscordLinkService
|
||||
ensureAsync(() -> {
|
||||
final IUser user = ess.getEss().getUser(uuid);
|
||||
ensureSync(() -> ess.getServer().getPluginManager().callEvent(new DiscordLinkStatusChangeEvent(user, member, member.getId(), false, cause)));
|
||||
|
||||
roleSyncManager.unSync(uuid, member.getId());
|
||||
});
|
||||
return true;
|
||||
}
|
||||
ensureAsync(() -> roleSyncManager.unSync(uuid, member.getId()));
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -101,9 +102,10 @@ public class AccountLinkManager implements IEssentialsModule, DiscordLinkService
|
||||
if (storage.remove(user.getBase().getUniqueId())) {
|
||||
ess.getApi().getMemberById(id).thenAccept(member -> ensureSync(() ->
|
||||
ess.getServer().getPluginManager().callEvent(new DiscordLinkStatusChangeEvent(user, member, id, false, cause))));
|
||||
|
||||
ensureAsync(() -> roleSyncManager.unSync(user.getBase().getUniqueId(), id));
|
||||
return true;
|
||||
}
|
||||
ensureAsync(() -> roleSyncManager.unSync(user.getBase().getUniqueId(), id));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user