From 3d2bca45483cc3455b74d77552695fb5db746124 Mon Sep 17 00:00:00 2001 From: tueem Date: Thu, 7 Nov 2024 11:49:45 +0100 Subject: [PATCH] fix off by one error --- .../marinara/interaction/methods/ButtonInteractionMethod.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/net/tomatentum/marinara/interaction/methods/ButtonInteractionMethod.java b/lib/src/main/java/net/tomatentum/marinara/interaction/methods/ButtonInteractionMethod.java index 165dfa0..baf8f4e 100644 --- a/lib/src/main/java/net/tomatentum/marinara/interaction/methods/ButtonInteractionMethod.java +++ b/lib/src/main/java/net/tomatentum/marinara/interaction/methods/ButtonInteractionMethod.java @@ -18,7 +18,7 @@ public class ButtonInteractionMethod extends InteractionMethod { @Override public Object getParameter(Object parameter, int index) { - Class type = getMethod().getParameterTypes()[index]; + Class type = getMethod().getParameterTypes()[index+1]; return wrapper.getComponentContextObject(parameter, type); }