added try catch

This commit is contained in:
booploops 2022-03-10 20:56:09 -08:00
parent f1baf887cf
commit f1d0f3002a

View file

@ -104,7 +104,11 @@ export class Plugins {
public callPlugins(event: string, ...args: any[]) {
for (const plugin in this.pluginsList) {
if (this.pluginsList[plugin][event]) {
this.pluginsList[plugin][event](...args);
try{
this.pluginsList[plugin][event](...args);
}catch(e) {
console.log(`[${plugin}] Plugin error: ${e}`);
}
}
}
}