From fb4bdf6fa2c9f8abf455628782b0b6e779f18de5 Mon Sep 17 00:00:00 2001 From: ShrBox Date: Sun, 21 Jan 2024 16:41:45 +0800 Subject: [PATCH] fix: fix some error --- src/api/BlockAPI.cpp | 4 ++-- src/api/PlayerAPI.cpp | 3 ++- src/legacyapi/utils/FileHelper.cpp | 4 ++-- src/main/EconomySystem.cpp | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/api/BlockAPI.cpp b/src/api/BlockAPI.cpp index 52220ba6..f3c6650c 100644 --- a/src/api/BlockAPI.cpp +++ b/src/api/BlockAPI.cpp @@ -16,7 +16,7 @@ #include "mc/world/level/block/Block.h" #include "mc/world/level/block/actor/BlockActor.h" #include "mc/world/level/dimension/Dimension.h" -#include "scriptx/Value.h" +#include "ScriptX/ScriptX.h" #include //////////////////// Class Definition //////////////////// @@ -609,4 +609,4 @@ Local McClass::spawnParticle(const Arguments &args) { return Boolean::newBoolean(true); } CATCH("Fail in SpawnParticle!") -} \ No newline at end of file +} diff --git a/src/api/PlayerAPI.cpp b/src/api/PlayerAPI.cpp index c29d72ff..2048fdf6 100644 --- a/src/api/PlayerAPI.cpp +++ b/src/api/PlayerAPI.cpp @@ -32,6 +32,7 @@ #include #include "MoreGlobal.h" +#include "ScriptX/ScriptX.h" #include "ll/api/form/ModalForm.h" #include "ll/api/service/PlayerInfo.h" #include "main/SafeGuardRecord.h" @@ -71,7 +72,6 @@ #include "mc/world/scores/ScoreInfo.h" #include "mc/world/scores/Scoreboard.h" #include "mc/world/scores/ScoreboardId.h" -#include "scriptx/Value.h" #include #include #include @@ -90,6 +90,7 @@ #include #include + //////////////////// Class Definition //////////////////// ClassDefine PlayerClassBuilder = diff --git a/src/legacyapi/utils/FileHelper.cpp b/src/legacyapi/utils/FileHelper.cpp index 3fbbb2ac..39203c04 100644 --- a/src/legacyapi/utils/FileHelper.cpp +++ b/src/legacyapi/utils/FileHelper.cpp @@ -7,7 +7,7 @@ #include "ll/api/utils/StringUtils.h" #include "ll/api/utils/WinUtils.h" -ll::Logger logger("FileHelper"); +extern ll::Logger logger; std::optional ReadAllFile(const std::string &filePath, bool isBinary) { @@ -142,4 +142,4 @@ std::pair UncompressFile(const std::string &filePath, filePath, realToDir), processTimeout); return {exitCode, std::move(output)}; -} \ No newline at end of file +} diff --git a/src/main/EconomySystem.cpp b/src/main/EconomySystem.cpp index 63c53334..f9e76025 100644 --- a/src/main/EconomySystem.cpp +++ b/src/main/EconomySystem.cpp @@ -12,6 +12,7 @@ ll::Logger economicLogger("EconomicSystem"); bool EconomySystem::init() { LLMoney_ListenBeforeEvent(MoneyBeforeEventCallback); LLMoney_ListenAfterEvent(MoneyEventCallback); + return true; } money_t EconomySystem::getMoney(xuid_t player) { return LLMoney_Get(player); }