File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed
Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff 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.18.1] - 2026-04-13
11+
12+ ### Fixed
13+
14+ - Added ` onPlayerCmd ` and ` onConsoleCmd ` event that was accidentally deleted.
15+
1016## [ 0.18.0] - 2026-04-07
1117
1218### Changed
@@ -1245,7 +1251,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12451251[ #353 ] : https://github.com/LiteLDev/LegacyScriptEngine/issues/353
12461252[ #358 ] : https://github.com/LiteLDev/LegacyScriptEngine/issues/358
12471253
1248- [ Unreleased ] : https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.18.0...HEAD
1254+ [ Unreleased ] : https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.18.1...HEAD
1255+ [ 0.18.1 ] : https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.18.0...v0.18.1
12491256[ 0.18.0 ] : https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.17.13...v0.18.0
12501257[ 0.17.13 ] : https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.17.12...v0.17.13
12511258[ 0.17.12 ] : https://github.com/LiteLDev/LegacyScriptEngine/compare/v0.17.11...v0.17.12
Original file line number Diff line number Diff line change @@ -842,6 +842,7 @@ void InitBasicEventListeners() {
842842#ifndef LSE_BACKEND_NODEJS
843843 if (!ProcessDebugEngine (cmd)) {
844844 ev.cancel ();
845+ return ;
845846 }
846847#endif
847848#ifdef LSE_BACKEND_NODEJS
@@ -855,6 +856,24 @@ void InitBasicEventListeners() {
855856 return ;
856857 }
857858#endif
859+ IF_LISTENED (EVENT_TYPES::onConsoleCmd) {
860+ if (!CallEvent (EVENT_TYPES::onConsoleCmd, String::newString (cmd))) {
861+ ev.cancel ();
862+ }
863+ }
864+ IF_LISTENED_END (EVENT_TYPES::onConsoleCmd);
865+ } else if (originType == CommandOriginType::Player) {
866+ std::string cmd = ev.commandContext ().mCommand ;
867+ if (cmd.starts_with (" /" )) {
868+ cmd.erase (0 , 1 );
869+ }
870+ Player* player = static_cast <Player*>(ev.commandContext ().mOrigin ->getEntity ());
871+ IF_LISTENED (EVENT_TYPES::onPlayerCmd) {
872+ if (!CallEvent (EVENT_TYPES::onPlayerCmd, PlayerClass::newPlayer (player), String::newString (cmd))) {
873+ ev.cancel ();
874+ }
875+ }
876+ IF_LISTENED_END (EVENT_TYPES::onPlayerCmd);
858877 }
859878 });
860879
Original file line number Diff line number Diff line change 22 "format_version" : 3 ,
33 "format_uuid" : " 289f771f-2c9a-4d73-9f3f-8492495a924d" ,
44 "tooth" : " github.com/LiteLDev/LegacyScriptEngine" ,
5- "version" : " 0.18.0 " ,
5+ "version" : " 0.18.1 " ,
66 "info" : {
77 "name" : " LegacyScriptEngine" ,
88 "description" : " A plugin engine for running LLSE plugins on LeviLamina" ,
You can’t perform that action at this time.
0 commit comments