diff --git a/.gitmodules b/.gitmodules index af5808d..20e7dc5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "SDK"] path = SDK url = https://github.com/LiteLDev/LiteLoaderSDK - branch = beta + branch = develop diff --git a/BEPlaceholderAPI/AutoUpgrade.cpp b/BEPlaceholderAPI/AutoUpgrade.cpp index f372dee..8960705 100644 --- a/BEPlaceholderAPI/AutoUpgrade.cpp +++ b/BEPlaceholderAPI/AutoUpgrade.cpp @@ -2,7 +2,6 @@ #include #include #include -#include #include #include #include @@ -11,7 +10,6 @@ #include #include #include -#include #include #include #include "Global.h" @@ -32,8 +30,8 @@ void checkUpdate() { nlohmann::json data1 = nlohmann::json::parse(info, nullptr, true, true); if (data1.find("data") != data1.end()) { nlohmann::json data2 = data1["data"]; - LL::Version verRemote = LL::Version::parse(data2[0]["title"].get()); - LL::Version verLocal = VERSION; + ll::Version verRemote = ll::Version::parse(data2[0]["title"].get()); + ll::Version verLocal = VERSION; if (verRemote > verLocal) { logger.info("New version available: {}\n-->https://www.minebbs.com/resources/4181/\n-->https://github.com/LiteLDev/BEPlaceholderAPI/releases", verRemote.toString()); } diff --git a/BEPlaceholderAPI/BEPlaceholderAPI.vcxproj b/BEPlaceholderAPI/BEPlaceholderAPI.vcxproj index 9797cc8..abcbf8f 100644 --- a/BEPlaceholderAPI/BEPlaceholderAPI.vcxproj +++ b/BEPlaceholderAPI/BEPlaceholderAPI.vcxproj @@ -32,7 +32,7 @@ false - $(SolutionDir)SDK\Header\third-party;$(SolutionDir)SDK\Header;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)ThirdParty + $(SolutionDir)SDK\include;$(SolutionDir)SDK\include\llapi;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)ThirdParty diff --git a/BEPlaceholderAPI/Global.h b/BEPlaceholderAPI/Global.h index 2ec3700..13b485f 100644 --- a/BEPlaceholderAPI/Global.h +++ b/BEPlaceholderAPI/Global.h @@ -37,5 +37,5 @@ extern Logger logger; #define S(x) std::to_string(x) #define JsonFile "plugins/BEPlaceholderAPI/config.json" #define LangParh "plugins/BEPlaceholderAPI/lang" -#define VERSION LL::Version{PLUGIN_VERSION_MAJOR, PLUGIN_VERSION_MINOR, PLUGIN_VERSION_REVISION, PLUGIN_LLVERSION_STATUS} +#define VERSION ll::Version{PLUGIN_VERSION_MAJOR, PLUGIN_VERSION_MINOR, PLUGIN_VERSION_REVISION, PLUGIN_LLVERSION_STATUS} #define BEPAPI "§l§e[BEPlaceholderAPI]§r " \ No newline at end of file diff --git a/BEPlaceholderAPI/Plugin.cpp b/BEPlaceholderAPI/Plugin.cpp index 53d49fb..e1b2fff 100644 --- a/BEPlaceholderAPI/Plugin.cpp +++ b/BEPlaceholderAPI/Plugin.cpp @@ -1,10 +1,11 @@ #include "Global.h" #include #include "Lang.hpp" +#include Logger logger(PLUGIN_NAME); inline void CheckProtocolVersion() { - auto currentProtocol = LL::getServerProtocolVersion(); + auto currentProtocol = ll::getServerProtocolVersion(); if (TARGET_BDS_PROTOCOL_VERSION != currentProtocol) { logger.warn("Protocol version not match, target version: {}, current version: {}.", diff --git a/BEPlaceholderAPI/RegPAPI.cpp b/BEPlaceholderAPI/RegPAPI.cpp index 0b3ee65..ae49275 100644 --- a/BEPlaceholderAPI/RegPAPI.cpp +++ b/BEPlaceholderAPI/RegPAPI.cpp @@ -34,7 +34,7 @@ void regPlayerInit() { }); PlaceholderAPI::registerPlayerPlaceholder("player_gamemode", [](Player* sp) { - return S(sp->getPlayerGameType()); + return S((int)sp->getPlayerGameType()); }); PlaceholderAPI::registerPlayerPlaceholder("player_x", [](Player* sp) { @@ -165,10 +165,10 @@ void regServerInit() { }); PlaceholderAPI::registerServerPlaceholder("server_version", []() { - return LL::getBdsVersion(); + return ll::getBdsVersion(); }); PlaceholderAPI::registerServerPlaceholder("server_protocol_version", []() { - return S(LL::getServerProtocolVersion()); + return S(ll::getServerProtocolVersion()); }); PlaceholderAPI::registerServerPlaceholder("server_total_entities", []() { return S(Level::getAllEntities().size()); @@ -177,7 +177,7 @@ void regServerInit() { return Global->getLevelData().getLevelName(); }); PlaceholderAPI::registerServerPlaceholder("server_difficulty", []() { - return S(Global->getDifficulty()); + return S((int)Global->getDifficulty()); }); PlaceholderAPI::registerServerPlaceholder("server_on_allowlist", []() { return S(Global->useAllowList()); diff --git a/BEPlaceholderAPI/Version.h b/BEPlaceholderAPI/Version.h index 2e57ba5..81b2a42 100644 --- a/BEPlaceholderAPI/Version.h +++ b/BEPlaceholderAPI/Version.h @@ -10,11 +10,11 @@ #define PLUGIN_AUTHOR "QingYu" #define PLUGIN_VERSION_MAJOR 1 #define PLUGIN_VERSION_MINOR 0 -#define PLUGIN_VERSION_REVISION 9 +#define PLUGIN_VERSION_REVISION 10 #define PLUGIN_VERSION_BUILD 0 #define PLUGIN_VERSION_STATUS PLUGIN_VERSION_RELEASE #define PLUGIN_VERSION_STRING TO_VERSION_STRING(PLUGIN_VERSION_MAJOR.PLUGIN_VERSION_MINOR.PLUGIN_VERSION_REVISION) -#define TARGET_BDS_PROTOCOL_VERSION 545 +#define TARGET_BDS_PROTOCOL_VERSION 554 // used by github actions(TODO) //#define TARGET_BDS_VERSION 1.18.30.04 @@ -32,7 +32,7 @@ #define PLUGIN_FILE_VERSION_STRING TO_VERSION_STRING(PLUGIN_VERSION_MAJOR.PLUGIN_VERSION_MINOR.PLUGIN_VERSION_REVISION.PLUGIN_VERSION_ACTIONS DEV) #else #define PLUGIN_FILE_VERSION_FLAG 0x0L -#define PLUGIN_LLVERSION_STATUS LL::Version::Release +#define PLUGIN_LLVERSION_STATUS ll::Version::Release #define PLUGIN_FILE_VERSION_STRING TO_VERSION_STRING(PLUGIN_VERSION_MAJOR.PLUGIN_VERSION_MINOR.PLUGIN_VERSION_REVISION.PLUGIN_VERSION_ACTION) #endif diff --git a/BEPlaceholderAPI/dllmain.cpp b/BEPlaceholderAPI/dllmain.cpp index 581bd02..9c1e868 100644 --- a/BEPlaceholderAPI/dllmain.cpp +++ b/BEPlaceholderAPI/dllmain.cpp @@ -16,10 +16,10 @@ BOOL APIENTRY DllMain( HMODULE hModule, switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: - LL::registerPlugin( + ll::registerPlugin( PLUGIN_NAME, PLUGIN_INTRODUCTION, - LL::Version(PLUGIN_VERSION_MAJOR, PLUGIN_VERSION_MINOR, PLUGIN_VERSION_REVISION, PLUGIN_LLVERSION_STATUS), + ll::Version(PLUGIN_VERSION_MAJOR, PLUGIN_VERSION_MINOR, PLUGIN_VERSION_REVISION, PLUGIN_LLVERSION_STATUS), std::map { #ifdef PLUGIN_AUTHOR { "Author", PLUGIN_AUTHOR }, diff --git a/LINK.txt b/LINK.txt index 3df87ac..a5883c1 100644 --- a/LINK.txt +++ b/LINK.txt @@ -1 +1 @@ -https://minecraft.azureedge.net/bin-win/bedrock-server-1.19.21.01.zip \ No newline at end of file +https://minecraft.azureedge.net/bin-win/bedrock-server-1.19.30.04.zip \ No newline at end of file diff --git a/SDK b/SDK index e78fcf5..c82a208 160000 --- a/SDK +++ b/SDK @@ -1 +1 @@ -Subproject commit e78fcf5b85420e05fab3a7728ba592c2c123e85d +Subproject commit c82a2081a583785e002070c3cfc5a4e3cabf0dfc