Refactor the way holder caches are invalidated in order to improve consistency (#734)

This commit is contained in:
Luck
2018-05-03 19:35:44 +01:00
Unverified
parent b8a1871cf1
commit a6facf7492
22 changed files with 231 additions and 260 deletions
@@ -55,11 +55,6 @@ public class BukkitConfigAdapter extends AbstractConfigurationAdapter implements
this.configuration = YamlConfiguration.loadConfiguration(this.file);
}
@Override
public boolean contains(String path) {
return this.configuration.contains(path);
}
@Override
public String getString(String path, String def) {
return this.configuration.getString(path, def);
@@ -403,7 +403,7 @@ public class VaultPermissionHook extends AbstractVaultPermission {
void holderSave(PermissionHolder holder) {
if (holder.getType().isUser()) {
User u = (User) holder;
this.plugin.getStorage().saveUser(u).thenRunAsync(() -> u.getRefreshBuffer().request(), this.plugin.getBootstrap().getScheduler().async());
this.plugin.getStorage().saveUser(u).thenRunAsync(() -> u.reloadCachedData(), this.plugin.getBootstrap().getScheduler().async());
}
if (holder.getType().isGroup()) {
Group g = (Group) holder;