Vault only save if a change was made
This commit is contained in:
parent
6874cfd5b1
commit
2d5975d6e3
@ -106,10 +106,9 @@ public class VaultPermissionHook extends Permission {
|
|||||||
} else {
|
} else {
|
||||||
holder.setPermission(permission, true, server);
|
holder.setPermission(permission, true, server);
|
||||||
}
|
}
|
||||||
} catch (ObjectAlreadyHasException ignored) {
|
|
||||||
}
|
|
||||||
|
|
||||||
save(holder);
|
save(holder);
|
||||||
|
} catch (ObjectAlreadyHasException ignored) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -126,10 +125,9 @@ public class VaultPermissionHook extends Permission {
|
|||||||
} else {
|
} else {
|
||||||
holder.unsetPermission(permission, server);
|
holder.unsetPermission(permission, server);
|
||||||
}
|
}
|
||||||
} catch (ObjectLacksException ignored) {
|
|
||||||
}
|
|
||||||
|
|
||||||
save(holder);
|
save(holder);
|
||||||
|
} catch (ObjectLacksException ignored) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -269,9 +267,9 @@ public class VaultPermissionHook extends Permission {
|
|||||||
} else {
|
} else {
|
||||||
user.setInheritGroup(group, server);
|
user.setInheritGroup(group, server);
|
||||||
}
|
}
|
||||||
} catch (ObjectAlreadyHasException ignored) {
|
|
||||||
}
|
save(user);
|
||||||
save(user);
|
} catch (ObjectAlreadyHasException ignored) {}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -294,9 +292,9 @@ public class VaultPermissionHook extends Permission {
|
|||||||
} else {
|
} else {
|
||||||
user.unsetInheritGroup(group, server);
|
user.unsetInheritGroup(group, server);
|
||||||
}
|
}
|
||||||
} catch (ObjectLacksException ignored) {
|
|
||||||
}
|
save(user);
|
||||||
save(user);
|
} catch (ObjectLacksException ignored) {}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user