XL force rename early
This commit is contained in:
parent
0f06bc2d23
commit
0ba4a71789
|
@ -1368,6 +1368,7 @@ var XenoLib = (() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const wasRenamed = !XenoLib.changeName(__filename, '1XenoLib'); /* prevent user from changing libs filename */
|
||||||
return class CXenoLib extends Plugin {
|
return class CXenoLib extends Plugin {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
@ -1377,9 +1378,9 @@ var XenoLib = (() => {
|
||||||
XenoLib.shutdown();
|
XenoLib.shutdown();
|
||||||
BDEvents.off('plugin-unloaded', listener);
|
BDEvents.off('plugin-unloaded', listener);
|
||||||
};
|
};
|
||||||
XenoLib.changeName(__filename, '1XenoLib'); /* prevent user from changing libs filename */
|
|
||||||
}
|
}
|
||||||
load() {
|
load() {
|
||||||
|
if (wasRenamed) return;
|
||||||
super.load();
|
super.load();
|
||||||
if (global.BDEvents) {
|
if (global.BDEvents) {
|
||||||
BDEvents.dispatch('xenolib-loaded');
|
BDEvents.dispatch('xenolib-loaded');
|
||||||
|
|
Loading…
Reference in New Issue