mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-28 03:57:36 +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.
|
/* 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,
|
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. */
|
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) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin.getApiProvider().fireEventAsync(new UserPermissionRefreshEvent(new UserLink(this)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,6 @@ class SpongeUser extends User {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void refreshPermissions() {
|
public void refreshPermissions() {
|
||||||
plugin.getApiProvider().fireEventAsync(new UserPermissionRefreshEvent(new UserLink(this)));
|
|
||||||
|
|
||||||
// Do nothing. Should be grabbed from PermissionService.
|
// Do nothing. Should be grabbed from PermissionService.
|
||||||
/*
|
/*
|
||||||
plugin.doSync(() -> {
|
plugin.doSync(() -> {
|
||||||
|
Loading…
Reference in New Issue
Block a user