Skip to content

Commit

Permalink
Update DefaultPermissionHookProvider.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev7ex committed Nov 23, 2024
1 parent 905eea7 commit d1707c7
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,11 @@ public void register(@NotNull final Plugin hookHolder, @NotNull final Permission
hooks.add(hook);

this.permissionHooks.put(hookHolder, hooks);
hook.register();

MultiPermsPlugin.getInstance()
.getLogger()
.info("Register [" + this.permissionHooks.get(hookHolder).size() + "] Permission Hooks from"
+ hookHolder.getClass().getSimpleName());
.info("Register [" + this.permissionHooks.get(hookHolder).size() + "] Permission Hooks from "
+ hookHolder.getName());
}

@Override
Expand All @@ -66,13 +65,12 @@ public void unregister(@NotNull final Plugin hookHolder) {
if ((hooks == null) || (hooks.isEmpty())) {
return;
}
this.permissionHooks.get(hookHolder).forEach(PermissionHook::unregister);
this.permissionHooks.remove(hookHolder);

MultiPermsPlugin.getInstance()
.getLogger()
.info("Unregister [" + this.permissionHooks.get(hookHolder).size() + "] Permission Hooks from"
+ hookHolder.getClass().getSimpleName());
.info("Unregister [" + this.permissionHooks.get(hookHolder).size() + "] Permission Hooks from "
+ hookHolder.getName());
}

@Override
Expand Down

0 comments on commit d1707c7

Please sign in to comment.