From 04856f7e6f5a0c00996197bd2e3be63741f65dc8 Mon Sep 17 00:00:00 2001 From: n15421 <119112174+n15421@users.noreply.github.com> Date: Thu, 12 Feb 2026 12:03:46 +0800 Subject: [PATCH] feat: adapt levilamina 1.9.x --- src/RegisterCommand.cpp | 5 +++-- tooth.json | 8 ++++---- xmake.lua | 9 +++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/RegisterCommand.cpp b/src/RegisterCommand.cpp index dd3162a..a69f4f3 100644 --- a/src/RegisterCommand.cpp +++ b/src/RegisterCommand.cpp @@ -1,6 +1,7 @@ #include "Features/Cleaner.h" #include "gmlib/mc/world/Level.h" #include "gmlib/gm/data/TpsStatus.h" +#include "mc/server/commands/CommandOutput.h" struct CleanerParam { enum class Despawn { despawn } despawn; enum class Action { tps, clean, reload, mspt } action; @@ -11,7 +12,7 @@ struct CleanerParam { void RegCleanerCommand() { auto& config = Cleaner::Entry::getInstance().getConfig(); - auto& cmd = ll::command::CommandRegistrar::getInstance().getOrCreateCommand( + auto& cmd = ll::command::CommandRegistrar::getInstance(false).getOrCreateCommand( config.Basic.Command, tr("cleaner.command.cleaner"), CommandPermissionLevel::GameDirectors @@ -74,7 +75,7 @@ void RegCleanerCommand() { }; void RegVoteCommand() { - auto& cmd = ll::command::CommandRegistrar::getInstance().getOrCreateCommand( + auto& cmd = ll::command::CommandRegistrar::getInstance(false).getOrCreateCommand( Cleaner::Entry::getInstance().getConfig().VoteClean.VoteCleanCommand, tr("cleaner.command.voteclean"), CommandPermissionLevel::Any diff --git a/tooth.json b/tooth.json index 334e88b..f7d5dd1 100644 --- a/tooth.json +++ b/tooth.json @@ -2,7 +2,7 @@ "format_version": 3, "format_uuid": "289f771f-2c9a-4d73-9f3f-8492495a924d", "tooth": "github.com/GroupMountain/Cleaner", - "version": "0.15.1", + "version": "0.16.0", "info": { "name": "Cleaner", "description": "A Powerful Entities Cleaning up Mod for BDS", @@ -18,9 +18,9 @@ "label": "", "platform": "win-x64", "dependencies": { - "github.com/GroupMountain/GMLIB-Release": ">=1.6.0", - "github.com/GroupMountain/ModAPI-Release": ">=0.2.0", - "github.com/MiracleForest/iListenAttentively-Release": ">=0.9.0" + "github.com/GroupMountain/GMLIB-Release": ">=1.9.0", + "github.com/GroupMountain/ModAPI-Release": ">=0.4.0", + "github.com/MiracleForest/iListenAttentively-Release": ">=0.11.0" }, "assets": [ { diff --git a/xmake.lua b/xmake.lua index 3abac36..f305e06 100644 --- a/xmake.lua +++ b/xmake.lua @@ -9,10 +9,10 @@ if not has_config("vs_runtime") then end -- Option 1: Use the latest version of LeviLamina released on GitHub. -add_requires("levilamina 1.6.1") -add_requires("levibuildscript 0.5.2") -add_requires("gmlib 1.6.0") -add_requires("ilistenattentively 0.9.0") +add_requires("levilamina 1.9.5", {configs = {target_type = "server"}}) +add_requires("levibuildscript 0.6.0") +add_requires("gmlib 1.9.0") +add_requires("ilistenattentively 0.11.0") target("Cleaner") -- Change this to your mod name. add_cxflags( @@ -35,6 +35,7 @@ target("Cleaner") -- Change this to your mod name. "UNICODE", "_HAS_CXX23=1" ) + add_defines("LL_PLAT_S") --TODO: check client compatibility add_rules("@levibuildscript/linkrule") set_exceptions("none") set_kind("shared")