From 83a3efd4b8135242b7b5fe5655d7b504293b0019 Mon Sep 17 00:00:00 2001 From: tueem Date: Mon, 2 Dec 2024 21:19:58 +0100 Subject: [PATCH] add canRun check which i forgor --- .../net/tomatentum/marinara/registry/InteractionRegistry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/net/tomatentum/marinara/registry/InteractionRegistry.java b/lib/src/main/java/net/tomatentum/marinara/registry/InteractionRegistry.java index 443ea39..d1640d6 100644 --- a/lib/src/main/java/net/tomatentum/marinara/registry/InteractionRegistry.java +++ b/lib/src/main/java/net/tomatentum/marinara/registry/InteractionRegistry.java @@ -54,7 +54,7 @@ public class InteractionRegistry { public void handle(Object context) { interactionMethods.forEach((m) -> { InteractionType type = marinara.getWrapper().getInteractionType(context.getClass()); - if (m.getType().equals(type)) + if (m.getType().equals(type) && m.canRun(context)) m.run(context); }); }