From 0ba4a71789ad536fd9228d21cb87e82ab3d69880 Mon Sep 17 00:00:00 2001 From: _Lighty_ <49841131+1Lighty@users.noreply.github.com> Date: Tue, 25 Feb 2020 09:47:02 +0100 Subject: [PATCH] XL force rename early --- Plugins/1XenoLib.plugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Plugins/1XenoLib.plugin.js b/Plugins/1XenoLib.plugin.js index 7ff7c74..688e780 100644 --- a/Plugins/1XenoLib.plugin.js +++ b/Plugins/1XenoLib.plugin.js @@ -1368,6 +1368,7 @@ var XenoLib = (() => { } } + const wasRenamed = !XenoLib.changeName(__filename, '1XenoLib'); /* prevent user from changing libs filename */ return class CXenoLib extends Plugin { constructor() { super(); @@ -1377,9 +1378,9 @@ var XenoLib = (() => { XenoLib.shutdown(); BDEvents.off('plugin-unloaded', listener); }; - XenoLib.changeName(__filename, '1XenoLib'); /* prevent user from changing libs filename */ } load() { + if (wasRenamed) return; super.load(); if (global.BDEvents) { BDEvents.dispatch('xenolib-loaded');