From 65a68681ded6c32198afad857ba39a1a1420ba2d Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Mon, 15 Apr 2019 11:55:19 +0200 Subject: [PATCH 1/2] Added @SubscribeEvent annotation to CommandListener When some users uses the ANnotated event manager of the JDA the CommandListener wouldn't work --- .../johnnyjayjay/discord/commandapi/CommandListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/johnnyjayjay/discord/commandapi/CommandListener.java b/src/main/java/com/github/johnnyjayjay/discord/commandapi/CommandListener.java index ee73528..293d7ba 100644 --- a/src/main/java/com/github/johnnyjayjay/discord/commandapi/CommandListener.java +++ b/src/main/java/com/github/johnnyjayjay/discord/commandapi/CommandListener.java @@ -5,6 +5,7 @@ import net.dv8tion.jda.core.entities.TextChannel; import net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent; import net.dv8tion.jda.core.hooks.ListenerAdapter; +import net.dv8tion.jda.core.hooks.SubscribeEvent import java.util.HashMap; import java.util.Map; @@ -19,7 +20,8 @@ public CommandListener(CommandSettings settings) { this.settings = settings; this.cooldowns = new HashMap<>(); } - + + @SubscribeEvent @Override public void onGuildMessageReceived(GuildMessageReceivedEvent event) { TextChannel channel = event.getChannel(); From 1dbc53c46a60087d3b1a6cb35def0cbb972b86f2 Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Mon, 15 Apr 2019 11:59:40 +0200 Subject: [PATCH 2/2] Added missing semi colon --- .../github/johnnyjayjay/discord/commandapi/CommandListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/johnnyjayjay/discord/commandapi/CommandListener.java b/src/main/java/com/github/johnnyjayjay/discord/commandapi/CommandListener.java index 293d7ba..6a9b862 100644 --- a/src/main/java/com/github/johnnyjayjay/discord/commandapi/CommandListener.java +++ b/src/main/java/com/github/johnnyjayjay/discord/commandapi/CommandListener.java @@ -5,7 +5,7 @@ import net.dv8tion.jda.core.entities.TextChannel; import net.dv8tion.jda.core.events.message.guild.GuildMessageReceivedEvent; import net.dv8tion.jda.core.hooks.ListenerAdapter; -import net.dv8tion.jda.core.hooks.SubscribeEvent +import net.dv8tion.jda.core.hooks.SubscribeEvent; import java.util.HashMap; import java.util.Map;