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(() -> {
|
ensureAsync(() -> {
|
||||||
final IUser user = ess.getEss().getUser(uuid);
|
final IUser user = ess.getEss().getUser(uuid);
|
||||||
ensureSync(() -> ess.getServer().getPluginManager().callEvent(new DiscordLinkStatusChangeEvent(user, member, member.getId(), false, cause)));
|
ensureSync(() -> ess.getServer().getPluginManager().callEvent(new DiscordLinkStatusChangeEvent(user, member, member.getId(), false, cause)));
|
||||||
|
|
||||||
|
roleSyncManager.unSync(uuid, member.getId());
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
ensureAsync(() -> roleSyncManager.unSync(uuid, member.getId()));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,9 +102,10 @@ public class AccountLinkManager implements IEssentialsModule, DiscordLinkService
|
|||||||
if (storage.remove(user.getBase().getUniqueId())) {
|
if (storage.remove(user.getBase().getUniqueId())) {
|
||||||
ess.getApi().getMemberById(id).thenAccept(member -> ensureSync(() ->
|
ess.getApi().getMemberById(id).thenAccept(member -> ensureSync(() ->
|
||||||
ess.getServer().getPluginManager().callEvent(new DiscordLinkStatusChangeEvent(user, member, id, false, cause))));
|
ess.getServer().getPluginManager().callEvent(new DiscordLinkStatusChangeEvent(user, member, id, false, cause))));
|
||||||
|
|
||||||
|
ensureAsync(() -> roleSyncManager.unSync(user.getBase().getUniqueId(), id));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
ensureAsync(() -> roleSyncManager.unSync(user.getBase().getUniqueId(), id));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user