Skip to content
This repository was archived by the owner on Jul 7, 2026. It is now read-only.

Commit a8ac933

Browse files
committed
fix: fix command registration on server #26
1 parent 2c401ac commit a8ac933

3 files changed

Lines changed: 20 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.13.2] - 2026-05-19
11+
12+
### Fixed
13+
14+
- Fixed command registration on server [#26]
15+
1016
## [0.13.1] - 2026-04-18
1117

1218
### Fixed
@@ -201,7 +207,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
201207

202208
- Fixed some bugs
203209

204-
[Unreleased]: https://github.com/LiteLDev/LeviOptimize/compare/v0.13.1...HEAD
210+
[#26]: https://github.com/LiteLDev/LeviOptimize/issues/26
211+
212+
[Unreleased]: https://github.com/LiteLDev/LeviOptimize/compare/v0.13.2...HEAD
213+
[0.13.2]: https://github.com/LiteLDev/LeviOptimize/compare/v0.13.1...v0.13.2
205214
[0.13.1]: https://github.com/LiteLDev/LeviOptimize/compare/v0.13.0...v0.13.1
206215
[0.13.0]: https://github.com/LiteLDev/LeviOptimize/compare/v0.12.1...v0.13.0
207216
[0.12.1]: https://github.com/LiteLDev/LeviOptimize/compare/v0.12.0...v0.12.1

src/LeviOptimize.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,22 @@ LeviOptimize& LeviOptimize::getInstance() {
2121
return instance;
2222
}
2323

24-
bool LeviOptimize::load() { return loadConfig(); }
24+
bool LeviOptimize::load() {
25+
if (getConfig().commands.timingCommand) {
26+
using namespace ll::event;
27+
EventBus::getInstance().emplaceListener<ServerCommandRegisterEvent>([](ServerCommandRegisterEvent&) {
28+
command::registerTimingCommand();
29+
});
30+
}
31+
return loadConfig();
32+
}
2533

2634
bool LeviOptimize::unload() { return true; }
2735

2836
bool LeviOptimize::enable() { // NOLINT
2937
if (!mConfig && !loadConfig()) {
3038
return false;
3139
}
32-
if (getConfig().commands.timingCommand) {
33-
using namespace ll::event;
34-
EventBus::getInstance().emplaceListener<ServerCommandRegisterEvent>([](ServerCommandRegisterEvent&) {
35-
command::registerTimingCommand();
36-
});
37-
}
3840
return true;
3941
}
4042

tooth.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"format_version": 3,
33
"format_uuid": "289f771f-2c9a-4d73-9f3f-8492495a924d",
44
"tooth": "github.com/LiteLDev/LeviOptimize",
5-
"version": "0.13.1",
5+
"version": "0.13.2",
66
"info": {
77
"name": "LeviOptimize",
88
"description": "A performance optimization mod for Minecraft Bedrock Server",

0 commit comments

Comments
 (0)