Skip to content

Commit 1de1398

Browse files
committed
fix: fix the mod reload
1 parent 116ba93 commit 1de1398

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/gmsidebar/ApiExport.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,8 @@ void Entry::exportApi() {
4242
});
4343
}
4444

45+
void Entry::removeApi() {
46+
LegacyRemoteCall::removeNameSpace("GMSidebar");
47+
}
48+
4549
} // namespace gmsidebar

src/gmsidebar/Entry.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ bool Entry::enable() {
2727

2828
bool Entry::disable() {
2929
GMSidebar::getInstance().disable();
30+
removeApi();
3031
return true;
3132
}
3233

src/gmsidebar/Entry.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class Entry {
2020

2121
void registerCmd();
2222
void exportApi();
23+
void removeApi();
2324

2425
private:
2526
ll::mod::NativeMod& mSelf;

0 commit comments

Comments
 (0)