Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,13 @@ public void unBanUser(@NotNull User user) {
* @since 1.0
*/
public boolean isOperationAllowed(@NotNull Operation operation, @NotNull HuskClaims plugin) {
if(owner != null && operation.getUser()
.filter(user -> owner.equals(user.getUuid()))
.map(u -> plugin.allowedOwnerOperations().contains(operation.getType()))
.orElse(false)) return true;

// If the operation is explicitly allowed, return it
return defaultFlags.contains(operation.getType())

// Or, if the user is the owner, return true
|| (owner != null && operation.getUser()
.filter(user -> owner.equals(user.getUuid()))
Expand Down