From 3778f45cf3581672b14d3b2bf3d1304155fe068f Mon Sep 17 00:00:00 2001 From: tueem Date: Fri, 1 Nov 2024 15:30:50 +0100 Subject: [PATCH] fix wrong logic --- .../java/net/tomatentum/marinara/util/ReflectionUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/main/java/net/tomatentum/marinara/util/ReflectionUtil.java b/lib/src/main/java/net/tomatentum/marinara/util/ReflectionUtil.java index 227e768..63105bf 100644 --- a/lib/src/main/java/net/tomatentum/marinara/util/ReflectionUtil.java +++ b/lib/src/main/java/net/tomatentum/marinara/util/ReflectionUtil.java @@ -30,8 +30,8 @@ public final class ReflectionUtil { if (!isAnnotationPresent(method, SlashCommand.class)) throw new RuntimeException(method.getName() + ": Missing ApplicationCommand Annotation on either Class or Method"); - if (!(method.isAnnotationPresent(SubCommand.class) && - isAnnotationPresent(method, SlashCommand.class))) { + if ((method.isAnnotationPresent(SubCommand.class) && + !isAnnotationPresent(method, SlashCommand.class))) { throw new RuntimeException(method.getName() + ": Missing ApplicationCommand Annotation on either Method or Class"); } }