File tree 2 files changed +2
-3
lines changed
src/main/java/net/clementraynaud/skoice
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,6 @@ public void update(User user) {
91
91
} else if (oldStatus == BotStatus .READY && newStatus != BotStatus .READY ) {
92
92
this .unregisterMinecraftListeners ();
93
93
if (newStatus != BotStatus .NOT_CONNECTED ) {
94
- this .unregisterBotListeners ();
95
94
new InterruptSystemTask (this .plugin ).run ();
96
95
}
97
96
}
@@ -139,7 +138,7 @@ public void registerBotListeners() {
139
138
);
140
139
}
141
140
142
- private void unregisterBotListeners () {
141
+ public void unregisterBotListeners () {
143
142
this .plugin .getBot ().getJDA ().removeEventListener (
144
143
this .guildVoiceGuildMuteListener ,
145
144
this .guildVoiceUpdateListener ,
Original file line number Diff line number Diff line change @@ -43,10 +43,10 @@ public InterruptSystemTask(Skoice plugin) {
43
43
public void run () {
44
44
ThreadUtil .ensureNotMainThread (true );
45
45
46
+ this .plugin .getListenerManager ().unregisterBotListeners ();
46
47
this .plugin .getUpdateNetworksTask ().interrupt ();
47
48
48
49
Guild guild = this .plugin .getBot ().getGuild ();
49
-
50
50
if (guild != null
51
51
&& guild .getSelfMember ().hasPermission (Permission .ADMINISTRATOR )
52
52
&& (guild .getRequiredMFALevel () != Guild .MFALevel .TWO_FACTOR_AUTH
You can’t perform that action at this time.
0 commit comments