mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Tweak hook getting logic
This commit is contained in:
1 parent
b234adddbb
commit
33cb19c088
1 file changed
+1
-1
@@ -177,7 +177,7 @@ public interface HuskHomes extends TaskRunner, EventDispatcher {
|
||||
*/
|
||||
default <H extends Hook> Optional<H> getHook(@NotNull Class<H> hookClass) {
|
||||
return getPluginHooks().stream()
|
||||
.filter(hook -> hook.getClass().isInstance(hookClass))
|
||||
.filter(hook -> hook.getClass() == hookClass)
|
||||
.findFirst()
|
||||
.map(hookClass::cast);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user