Fix bukkit permission subscriptions

This commit is contained in:
Luck
2017-01-14 23:18:48 +00:00
Unverified
parent cd4a684613
commit 6501e5cf8d
7 changed files with 127 additions and 31 deletions
@@ -394,4 +394,13 @@ public interface LuckPermsPlugin {
}
/**
* Called when a users data is refreshed
*
* @param user the user
*/
default void onUserRefresh(User user) {
}
}
@@ -117,6 +117,7 @@ public class User extends PermissionHolder implements Identifiable<UserIdentifie
userData = new UserCache(this, getPlugin().getCalculatorFactory());
userData.preCalculate(getPlugin().getPreProcessContexts(op));
getPlugin().onUserRefresh(this);
}
/**
@@ -139,6 +140,7 @@ public class User extends PermissionHolder implements Identifiable<UserIdentifie
ud.recalculatePermissions();
ud.recalculateMeta();
getPlugin().getApiProvider().fireEventAsync(new UserPermissionRefreshEvent(new UserLink(this)));
getPlugin().onUserRefresh(this);
}
/**