Skip to content

Commit

Permalink
chore: update CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed May 2, 2024
1 parent 99a2e71 commit 7cac6fd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 27 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Fix truePos pre calculation
- Fix onProjectileHitBlock & onProjectileHitEntity #108
- Fix mc.explode #111

## [0.7.3] - 2024-05-01

Expand Down
8 changes: 0 additions & 8 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ nav:
- GuiAPI:
- apis/GuiAPI/Form.md
- apis/GuiAPI/FormBuilder.md
- NativeAPI:
- apis/NativeAPI/NativeFunction.md
- apis/NativeAPI/NativePatch.md
- apis/NativeAPI/NativePointer.md
- apis/NativeAPI/Summary.md
- NbtAPI:
- apis/NbtAPI/NBT.md
- apis/NbtAPI/NBTCompound.md
Expand All @@ -65,9 +60,6 @@ nav:
- apis/SystemAPI/SystemCall.md
- apis/SystemAPI/SystemInfo.md

exclude_docs: |
api/native/
theme:
name: material
features:
Expand Down
9 changes: 0 additions & 9 deletions src/legacy/api/CommandAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,21 @@
#include "engine/EngineOwnData.h"
#include "engine/GlobalShareData.h"
#include "engine/LocalShareData.h"
#include "ll/api/command/CommandRegistrar.h"
#include "ll/api/event/EventBus.h"
#include "ll/api/event/server/ServerStartedEvent.h"
#include "ll/api/service/Bedrock.h"
#include "ll/api/service/ServerInfo.h"
#include "lse/Plugin.h"
#include "magic_enum.hpp"
#include "main/Configs.h"
#include "mc/_HeaderOutputPredefine.h"
#include "mc/codebuilder/MCRESULT.h"
#include "mc/common/wrapper/GenerateMessageResult.h"
#include "mc/deps/json/JsonHelpers.h"
#include "mc/enums/CurrentCmdVersion.h"
#include "mc/locale/I18n.h"
#include "mc/locale/Localization.h"
#include "mc/server/ServerLevel.h"
#include "mc/server/commands/BlockStateCommandParam.h"
#include "mc/server/commands/CommandBlockName.h"
#include "mc/server/commands/CommandBlockNameResult.h"
#include "mc/server/commands/CommandContext.h"
#include "mc/server/commands/CommandOriginLoader.h"
#include "mc/server/commands/CommandOutputParameter.h"
#include "mc/server/commands/CommandOutputType.h"
#include "mc/server/commands/CommandPermissionLevel.h"
#include "mc/server/commands/CommandVersion.h"
Expand All @@ -43,9 +36,7 @@
#include "mc/world/item/ItemInstance.h"
#include "mc/world/item/registry/ItemStack.h"
#include "mc/world/level/dimension/Dimension.h"
#include "utils/Utils.h"

#include <filesystem>
#include <string>
#include <vector>

Expand Down
5 changes: 0 additions & 5 deletions src/legacy/api/CommandCompatibleAPI.cpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
#include "api/APIHelp.h"
#include "api/CommandAPI.h"
#include "api/McAPI.h"
#include "api/PlayerAPI.h"
#include "engine/EngineOwnData.h"
#include "engine/GlobalShareData.h"
#include "engine/LocalShareData.h"
#include "ll/api/event/EventBus.h"
#include "ll/api/event/server/ServerStartedEvent.h"
#include "ll/api/memory/Memory.h"
#include "ll/api/service/Bedrock.h"
#include "main/Configs.h"
#include "main/Global.h"
#include "utils/Utils.h"

#include <filesystem>
#include <ll/api/command/CommandRegistrar.h>
#include <string>
#include <vector>
Expand Down
10 changes: 5 additions & 5 deletions src/lse/PluginManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ ll::Expected<> PluginManager::load(ll::plugin::Manifest manifest) {
logger.info("loading plugin {}", manifest.name);

if (hasPlugin(manifest.name)) {
throw std::runtime_error("plugin already loaded");
return ll::makeStringError("plugin already loaded");
}

auto& scriptEngine = *EngineManager::newEngine(manifest.name);
Expand Down Expand Up @@ -166,7 +166,7 @@ ll::Expected<> PluginManager::load(ll::plugin::Manifest manifest) {
auto baseLibPath = self.getPluginDir() / "baselib" / BaseLibFileName;
auto baseLibContent = ll::file_utils::readFile(baseLibPath);
if (!baseLibContent) {
throw std::runtime_error(fmt::format("failed to read BaseLib at {}", baseLibPath.string()));
return ll::makeStringError(fmt::format("failed to read BaseLib at {}", baseLibPath.string()));
}
scriptEngine.eval(baseLibContent.value());
#endif
Expand All @@ -176,12 +176,12 @@ ll::Expected<> PluginManager::load(ll::plugin::Manifest manifest) {
ENGINE_OWN_DATA()->pluginFileOrDirPath = entryPath.string();
#ifdef LEGACY_SCRIPT_ENGINE_BACKEND_PYTHON
if (!PythonHelper::loadPluginCode(&scriptEngine, entryPath.string(), dirPath.string())) {
throw std::runtime_error(fmt::format("failed to load plugin code"));
return ll::makeStringError(fmt::format("failed to load plugin code"));
}
#endif
#ifdef LEGACY_SCRIPT_ENGINE_BACKEND_NODEJS
if (!NodeJsHelper::loadPluginCode(&scriptEngine, entryPath.string(), dirPath.string())) {
throw std::runtime_error(fmt::format("failed to load plugin code"));
return ll::makeStringError(fmt::format("failed to load plugin code"));
}
#endif
#if (defined LEGACY_SCRIPT_ENGINE_BACKEND_QUICKJS) || (defined LEGACY_SCRIPT_ENGINE_BACKEND_LUA)
Expand All @@ -192,7 +192,7 @@ ll::Expected<> PluginManager::load(ll::plugin::Manifest manifest) {
// loadFile failed, try eval
auto pluginEntryContent = ll::file_utils::readFile(entryPath);
if (!pluginEntryContent) {
throw std::runtime_error(fmt::format("Failed to read plugin entry at {}", entryPath.string()));
return ll::makeStringError(fmt::format("Failed to read plugin entry at {}", entryPath.string()));
}
scriptEngine.eval(pluginEntryContent.value());
}
Expand Down

0 comments on commit 7cac6fd

Please sign in to comment.