forked from Fascinated/Bat
add null check
This commit is contained in:
parent
5959b814a7
commit
938005f6d9
@ -73,6 +73,9 @@ public class ChannelListener implements EventListener {
|
|||||||
lastVoiceChannel.put(user, voiceChannel);
|
lastVoiceChannel.put(user, voiceChannel);
|
||||||
}
|
}
|
||||||
VoiceChannel voiceChannel = lastVoiceChannel.get(user);
|
VoiceChannel voiceChannel = lastVoiceChannel.get(user);
|
||||||
|
if (voiceChannel == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
boolean joined = voiceChannel.getMembers().contains(event.getMember());
|
boolean joined = voiceChannel.getMembers().contains(event.getMember());
|
||||||
if (!joined) {
|
if (!joined) {
|
||||||
lastVoiceChannel.remove(user);
|
lastVoiceChannel.remove(user);
|
||||||
|
Loading…
Reference in New Issue
Block a user