mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-26 19:18:17 +01:00
Fire PermissionRefreshEvent after the nodes have actually updated
This commit is contained in:
parent
1a2fa5d8c3
commit
5c760aabd4
@ -106,12 +106,13 @@ public class BukkitUser extends User {
|
||||
/* Must be called sync, as #recalculatePermissions is an unmodified Bukkit API call that is absolutely not thread safe.
|
||||
Shouldn't be too taxing on the server. This only gets called when permissions have actually changed,
|
||||
which is like once per user per login, assuming their permissions don't get modified. */
|
||||
plugin.doSync(() -> attachment.getPermissible().recalculatePermissions());
|
||||
plugin.doSync(() -> {
|
||||
attachment.getPermissible().recalculatePermissions();
|
||||
plugin.getApiProvider().fireEventAsync(new UserPermissionRefreshEvent(new UserLink(this)));
|
||||
});
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
plugin.getApiProvider().fireEventAsync(new UserPermissionRefreshEvent(new UserLink(this)));
|
||||
}
|
||||
}
|
||||
|
@ -43,8 +43,6 @@ class SpongeUser extends User {
|
||||
|
||||
@Override
|
||||
public void refreshPermissions() {
|
||||
plugin.getApiProvider().fireEventAsync(new UserPermissionRefreshEvent(new UserLink(this)));
|
||||
|
||||
// Do nothing. Should be grabbed from PermissionService.
|
||||
/*
|
||||
plugin.doSync(() -> {
|
||||
|
Loading…
Reference in New Issue
Block a user