Skip to content

Commit

Permalink
1.19.30.04
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamguxiang committed Sep 24, 2022
1 parent 4c4c767 commit f5f1a27
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "SDK"]
path = SDK
url = https://github.com/LiteLDev/LiteLoaderSDK
branch = beta
branch = develop
6 changes: 2 additions & 4 deletions BEPlaceholderAPI/AutoUpgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <LLAPI.h>
#include <Nlohmann/json.hpp>
#include <ServerAPI.h>
#include <SimpleIni/SimpleIni.h>
#include <Utils/CryptHelper.h>
#include <Utils/FileHelper.h>
#include <Utils/NetworkHelper.h>
Expand All @@ -11,7 +10,6 @@
#include <filesystem>
#include <httplib/httplib.h>
#include <process.h>
#include <seh_exception/seh_exception.hpp>
#include <string>
#include <thread>
#include "Global.h"
Expand All @@ -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<string>());
LL::Version verLocal = VERSION;
ll::Version verRemote = ll::Version::parse(data2[0]["title"].get<string>());
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());
}
Expand Down
2 changes: 1 addition & 1 deletion BEPlaceholderAPI/BEPlaceholderAPI.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(SolutionDir)SDK\Header\third-party;$(SolutionDir)SDK\Header;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)ThirdParty</IncludePath>
<IncludePath>$(SolutionDir)SDK\include;$(SolutionDir)SDK\include\llapi;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(SolutionDir)ThirdParty</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
Expand Down
2 changes: 1 addition & 1 deletion BEPlaceholderAPI/Global.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
3 changes: 2 additions & 1 deletion BEPlaceholderAPI/Plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#include "Global.h"
#include <ServerAPI.h>
#include "Lang.hpp"
#include <windows.h>
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: {}.",
Expand Down
8 changes: 4 additions & 4 deletions BEPlaceholderAPI/RegPAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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());
Expand All @@ -177,7 +177,7 @@ void regServerInit() {
return Global<Level>->getLevelData().getLevelName();
});
PlaceholderAPI::registerServerPlaceholder("server_difficulty", []() {
return S(Global<PropertiesSettings>->getDifficulty());
return S((int)Global<PropertiesSettings>->getDifficulty());
});
PlaceholderAPI::registerServerPlaceholder("server_on_allowlist", []() {
return S(Global<PropertiesSettings>->useAllowList());
Expand Down
6 changes: 3 additions & 3 deletions BEPlaceholderAPI/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions BEPlaceholderAPI/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string, std::string> {
#ifdef PLUGIN_AUTHOR
{ "Author", PLUGIN_AUTHOR },
Expand Down
2 changes: 1 addition & 1 deletion LINK.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://minecraft.azureedge.net/bin-win/bedrock-server-1.19.21.01.zip
https://minecraft.azureedge.net/bin-win/bedrock-server-1.19.30.04.zip
2 changes: 1 addition & 1 deletion SDK
Submodule SDK updated from e78fcf to c82a20

0 comments on commit f5f1a27

Please sign in to comment.