Fix mcchat crash on config issue
This commit is contained in:
parent
491b5e4ee9
commit
28cff3ed43
1 changed files with 2 additions and 1 deletions
|
@ -236,6 +236,7 @@ public class MinecraftChatModule extends Component<DiscordPlugin> {
|
||||||
chconc.set("toggles", chcon.toggles);
|
chconc.set("toggles", chcon.toggles);
|
||||||
chconc.set("brtoggles", chcon.brtoggles.stream().map(TBMCSystemChatEvent.BroadcastTarget::getName).collect(Collectors.toList()));
|
chconc.set("brtoggles", chcon.brtoggles.stream().map(TBMCSystemChatEvent.BroadcastTarget::getName).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
if (listener != null) //Can be null if disabled because of a config error
|
||||||
listener.stop(true);
|
listener.stop(true);
|
||||||
getPlugin().getManager().unregisterCommand(mcChatCommand);
|
getPlugin().getManager().unregisterCommand(mcChatCommand);
|
||||||
getPlugin().getManager().unregisterCommand(channelconCommand);
|
getPlugin().getManager().unregisterCommand(channelconCommand);
|
||||||
|
|
Loading…
Reference in a new issue