diff --git a/src/Api/RunCmdEx.cpp b/src/Api/RunCmdEx.cpp index 0b1e4b0..a7c0066 100644 --- a/src/Api/RunCmdEx.cpp +++ b/src/Api/RunCmdEx.cpp @@ -1,6 +1,9 @@ #include "Api.h" +#include "mc/locale/I18n.h" +#include "mc/locale/Localization.h" #include "mc/server/commands/CommandOutput.h" + namespace tls::api { RunCmdExOutput runCmdEx(const string& cmd) { @@ -21,7 +24,9 @@ RunCmdExOutput runCmdEx(const string& cmd) { if (command) { command->run(origin, output); for (auto msg : output.getMessages()) { - outputStr = outputStr.append(I18n::get(msg.getMessageId(), msg.getParams())).append("\n"); + string tmp; + getI18n().getCurrentLanguage()->get(msg.getMessageId(), tmp, msg.getParams()); + outputStr += tmp.append("\n"); } if (output.getMessages().size()) { outputStr.pop_back(); diff --git a/xmake.lua b/xmake.lua index a5b0eac..0ebcd4b 100644 --- a/xmake.lua +++ b/xmake.lua @@ -6,7 +6,7 @@ add_repositories("liteldev-repo https://github.com/LiteLDev/xmake-repo.git") -- add_requires("levilamina develop") to use develop version -- please note that you should add bdslibrary yourself if using dev version add_requires( - "levilamina 0.11.0", + "levilamina 0.12.1", "PermissionCore" )