diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml deleted file mode 100644 index f495f91..0000000 --- a/.github/workflows/auto-update.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: "auto check and update" - -on: -# push: -# branches: -# - 'master' - schedule: - - cron: "30 17 * * 1" - -jobs: - checkUpdate: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v3 - with: - token: ${{secrets.ACTIONS_TOKEN}} - - - name: Set up Python 3.10 - uses: actions/setup-python@v3 - with: - python-version: 3.10.4 - - run: pip install requests gitpython - - name: Check and Update - working-directory: ${{env.GITHUB_WORKSPACE}} - run: | - git config --global user.name "github-actions[bot]" - git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - python scripts/checkLLRelease.py - git submodule update --init --recursive --remote - git push && git push --tags || exit 0 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7624971..2b8de77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,4 @@ -# v1.3.7(560协议) +# v1.3.7-1.16.40(408协议) -- 支持1.19.50 & 1.19.51 -- 适配LiteLoader v2.9.1 -- 此为自动更新,可能会有问题;如有问题提交issue \ No newline at end of file +- 支持1.16.40 +- 适配LiteLoaderBDS-1.16.40 \ No newline at end of file diff --git a/CHANGELOG_en.md b/CHANGELOG_en.md index 44b88e4..71ef20c 100644 --- a/CHANGELOG_en.md +++ b/CHANGELOG_en.md @@ -1,5 +1,4 @@ -# v1.3.7(560 Protocol) +# v1.3.7-1.16.40(408 Protocol) -- Support 1.19.50 & 1.19.51 -- Support LiteLoader v2.9.1 -- This is auto update, maybe have error. Please submit issue, If have error \ No newline at end of file +- Support 1.16.40 +- Support LiteLoaderBDS-1.16.40 \ No newline at end of file diff --git a/LLCheckBag/CheckBagManager.cpp b/LLCheckBag/CheckBagManager.cpp index dcd2b99..21421b1 100644 --- a/LLCheckBag/CheckBagManager.cpp +++ b/LLCheckBag/CheckBagManager.cpp @@ -143,8 +143,6 @@ std::vector CheckBagManager::getPlayerList(PlayerCategory category) if (category == PlayerCategory::All) return getPlayerList(); std::vector playerList; - size_t index = 0; - size_t rindex = mUuidNameMap.size() - 1; for (auto& [suuid, value] : mUuidNameMap) { auto& name = value.first; //TestFuncTime(mUuidNameMap.isFakePlayer, suuid); // <=1 @@ -470,7 +468,8 @@ CheckBagManager::Result CheckBagManager::importData(mce::UUID const& uuid, std:: return Result::Error; if (isBagOnly) { if (auto player = getPlayer(uuid)) { - PlayerDataHelper::setPlayerBag(player, *newTag); + if(PlayerDataHelper::setPlayerBag(player, *newTag)) + return Result::Success; } else { auto oldTag = PlayerDataHelper::getExpectedPlayerTag(uuid); diff --git a/LLCheckBag/FormHelper.cpp b/LLCheckBag/FormHelper.cpp index 78e8c01..a6f6ada 100644 --- a/LLCheckBag/FormHelper.cpp +++ b/LLCheckBag/FormHelper.cpp @@ -307,6 +307,8 @@ namespace FormHelper { })); form.sendTo((ServerPlayer*)player, [filePath, targetUuid](Player* player, const std::map>& data) { + if(data.empty()) + return; auto modeDW = std::dynamic_pointer_cast(data.at("importMode")); auto isBagOnly = modeDW->getString() == tr("screen.import.mode.bag_only"); auto targetDW = std::dynamic_pointer_cast(data.at("target")); diff --git a/LLCheckBag/Utils.h b/LLCheckBag/Utils.h index c035f32..97e5963 100644 --- a/LLCheckBag/Utils.h +++ b/LLCheckBag/Utils.h @@ -5,7 +5,10 @@ #include inline mce::UUID UuidFromNameOrUuid(std::string const& name) { - auto uuid = mce::UUID::fromString(name); +// std::regex uuid_reg("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"); +// if(std::regex_match(name,uuid_reg)) +// return mce::UUID::fromString(name); + mce::UUID uuid = mce::UUID::fromString(name); if (!uuid) { auto suuid = PlayerInfo::getUUID(name); if (!suuid.empty()) diff --git a/README.md b/README.md index 0747d82..8b6c8ce 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# LLCheckBag +# LLCheckBag-1.16.40 这是 [Bedrock Minecraft Server](https://www.minecraft.net/en-us/download/server/bedrock) 的背包检查插件, 可以查看存档中所有玩家背包的插件,并附带多种玩家数据操作用于确认玩家数据是否异常 需要 [LiteLoader](https://github.com/LiteLDev/LiteLoaderBDS) 的前置 @@ -14,11 +14,11 @@ > 注:以上功能均支持存档中所有玩家,理论上服务器安装 LiteLoader 2.0 后进入过服务器的玩家均能识别出玩家名,否则以uuid形式显示 ## 下载安装 -> *确保你已经正确安装[LiteLoader](https://github.com/LiteLDev/LiteLoaderBDS)加载器* +> *确保你已经正确安装[LiteLoader-1.16.40](https://github.com/quizhizhe/LiteLoaderBDS-1.16.40)加载器* * 二进制下载 - * 可从 [MineBBS](https://www.minebbs.com/resources/llcheckbag.3367/) 或者 [Github Release](https://github.com/quizhizhe/LLCheckBag/releases) 下载,完成后解压压缩包内容到 plugins 目录下即可 + * 可从 [Github Release](https://github.com/quizhizhe/LLCheckBag/releases) 下载,完成后解压压缩包内容到 plugins 目录下即可 * 从源码编译 - * 使用 `git clone --recursive https://github.com/quizhizhe/LLCheckBag.git` 拉取项目,用 [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) 打开sln文件,设置项目调试路径为bds路径,生成即可 + * 使用 `git clone -b 1.16.40 https://github.com/quizhizhe/LLCheckBag.git` 拉取项目,用 [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) 打开sln文件,设置项目调试路径为bds路径,生成即可 ## 用法 * 指令(*可将 llcheckbag 替换成设置的指令别名,默认 llcb*): diff --git a/README_en.md b/README_en.md index 95d1008..d3acc02 100644 --- a/README_en.md +++ b/README_en.md @@ -1,4 +1,4 @@ -# LLCheckBag +# LLCheckBag-1.16.40 This is the inventory check plug-in for [Bedrock Minecraft Server](https://www.minecraft.net/en-us/download/server/bedrock), which can check the plug-ins of all players' inventory in the Level, and comes with a variety of player data operations to confirm whether the player data is abnormal. [LiteLoader](https://github.com/LiteLDev/LiteLoaderBDS) is required beforehand. @@ -16,11 +16,11 @@ which can check the plug-ins of all players' inventory in the Level, and comes w > Note: The above functions support all players in the Level. In theory, the name of players who have entered the server after installing LiteLoader 2.0 on the server can be recognized , otherwise it will be displayed in the form of uuid ## Download and install -> *Make sure you have the [LiteLoader](https://github.com/LiteLDev/LiteLoaderBDS) installed correctly* +> *Make sure you have the [LiteLoader-1.16.40](https://github.com/quizhizhe/LiteLoaderBDS-1.16.40) installed correctly* * Download binary - * It can be downloaded from [MineBBS](https://www.minebbs.com/resources/llcheckbag.3367/) or [Github Release](https://github.com/quizhizhe/LLCheckBag/releases). After completion, unzip the contents of the compressed package to the plugins directory. + * It can be downloaded [Github Release](https://github.com/quizhizhe/LLCheckBag/releases). After completion, unzip the contents of the compressed package to the plugins directory. * Compile from source - * Use `git clone --recursive https://github.com/quizhizhe/LLCheckBag.git` to pull the project, open the sln file with [Visual Studio 2022](https://visualstudio.microsoft.com/vs/), Set the project debug path to the bds path and generate it + * Use `git clone -b 1.16.40 https://github.com/quizhizhe/LLCheckBag.git` to pull the project, open the sln file with [Visual Studio 2022](https://visualstudio.microsoft.com/vs/), Set the project debug path to the bds path and generate it ## Usage * Command(*You can replace llcheckbag with the set command alias, the default is llcb*)