From 92d2896d3e94c75a2cc3eb3a911c043b2d696349 Mon Sep 17 00:00:00 2001 From: engsr6982 <109733049+engsr6982@users.noreply.github.com> Date: Wed, 24 Jul 2024 17:30:53 +0800 Subject: [PATCH] chore: Adapted for Levilamina 0.13.4 --- CHANGELOG.md | 6 ++++++ src/plotcraft/command/Command.h | 1 - src/plugin/MyPlugin.cpp | 5 ++--- src/plugin/MyPlugin.h | 8 ++++---- tooth.json | 12 ++++++------ xmake.lua | 8 ++++---- 6 files changed, 22 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4883d4a..70dacf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.6.1] - 2024-07-24 + +### Changed + +- 适配 LeviLamina 0.13.4 + ## [0.6.0] - 2024-07-23 ### Added: diff --git a/src/plotcraft/command/Command.h b/src/plotcraft/command/Command.h index c5093ce..dbe758d 100644 --- a/src/plotcraft/command/Command.h +++ b/src/plotcraft/command/Command.h @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/src/plugin/MyPlugin.cpp b/src/plugin/MyPlugin.cpp index dec2de2..6a1d6e5 100644 --- a/src/plugin/MyPlugin.cpp +++ b/src/plugin/MyPlugin.cpp @@ -7,8 +7,7 @@ #include "ll/api/event/EventBus.h" #include "ll/api/event/server/ServerStartedEvent.h" #include "ll/api/i18n/I18n.h" -#include "ll/api/plugin/NativePlugin.h" -#include "ll/api/plugin/RegisterHelper.h" +#include "ll/api/mod/RegisterHelper.h" #include "ll/api/service/Bedrock.h" #include "mc/server/ServerLevel.h" #include "mc/server/commands/CommandContext.h" @@ -120,4 +119,4 @@ bool MyPlugin::disable() { } // namespace my_plugin -LL_REGISTER_PLUGIN(my_plugin::MyPlugin, my_plugin::instance); +LL_REGISTER_MOD(my_plugin::MyPlugin, my_plugin::instance); diff --git a/src/plugin/MyPlugin.h b/src/plugin/MyPlugin.h index c655262..834c599 100644 --- a/src/plugin/MyPlugin.h +++ b/src/plugin/MyPlugin.h @@ -1,6 +1,6 @@ #pragma once -#include "ll/api/plugin/NativePlugin.h" +#include "ll/api/mod/NativeMod.h" namespace my_plugin { @@ -9,9 +9,9 @@ class MyPlugin { public: static MyPlugin& getInstance(); - MyPlugin(ll::plugin::NativePlugin& self) : mSelf(self) {} + MyPlugin(ll::mod::NativeMod& self) : mSelf(self) {} - [[nodiscard]] ll::plugin::NativePlugin& getSelf() const { return mSelf; } + [[nodiscard]] ll::mod::NativeMod& getSelf() const { return mSelf; } /// @return True if the plugin is loaded successfully. bool load(); @@ -27,7 +27,7 @@ class MyPlugin { // bool unload(); private: - ll::plugin::NativePlugin& mSelf; + ll::mod::NativeMod& mSelf; }; } // namespace my_plugin diff --git a/tooth.json b/tooth.json index 7e5b35e..6543686 100644 --- a/tooth.json +++ b/tooth.json @@ -1,7 +1,7 @@ { "format_version": 2, "tooth": "github.com/engsr6982/PlotCraft", - "version": "0.6.0", + "version": "0.6.1", "info": { "name": "PlotCraft - 地皮插件", "description": "地皮世界|地皮购买|地皮出售|地皮共享|地皮评论", @@ -13,12 +13,12 @@ "plotcraft" ] }, - "asset_url": "https://github.com/engsr6982/PlotCraft/releases/download/v0.6.0/PlotCraft-windows-x64.zip", + "asset_url": "https://github.com/engsr6982/PlotCraft/releases/download/v0.6.1/PlotCraft-windows-x64.zip", "prerequisites": { - "github.com/LiteLDev/LeviLamina": "0.13.x", - "github.com/LiteLDev/MoreDimensions": "0.4.x", - "github.com/LiteLDev/LegacyMoney": "0.8.x", - "github.com/LiteLDev/LegacyRemoteCall": "0.8.x" + "github.com/LiteLDev/LeviLamina": "0.13.4", + "github.com/LiteLDev/MoreDimensions": "0.4.1", + "github.com/LiteLDev/LegacyMoney": "0.8.2", + "github.com/LiteLDev/LegacyRemoteCall": "0.8.2" }, "files": { "place": [ diff --git a/xmake.lua b/xmake.lua index 76dfb80..afddb1b 100644 --- a/xmake.lua +++ b/xmake.lua @@ -6,9 +6,9 @@ add_repositories("liteldev-repo https://github.com/LiteLDev/xmake-repo.git") -- add_requires("levilamina develop") to use develop version -- please note that you should add bdslibrary yourself if using dev version add_requires( - "levilamina 0.13.3", + "levilamina 0.13.4", "sqlitecpp 3.2.1", - "legacymoney 0.8.1" + "legacymoney 0.8.2" ) if not has_config("vs_runtime") then @@ -16,11 +16,11 @@ if not has_config("vs_runtime") then end if get_config("overworld") == false then - add_requires("more-dimensions 0.4.0") + add_requires("more-dimensions 0.4.1") end if get_config("remote") == true then - add_requires("legacyremotecall 0.8.1") + add_requires("legacyremotecall 0.8.2") end option("gen") -- Generator