From a9a936eff680fc911b3fa5f96d084c9c481a3d4b Mon Sep 17 00:00:00 2001 From: 3944Realms Date: Tue, 17 Feb 2026 14:19:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=BD=E4=BB=A4=E5=B9=AB?= =?UTF-8?q?=E5=8A=A9=E5=B1=95=E9=96=8B=E9=82=8F=E8=BC=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../lib39/core/command/ICommandHelpManager.java | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index c0b5d81..450d9fc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -33,7 +33,7 @@ mod_name=3944Realms 's Lib Mod # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=MIT # The mod version. See https://semver.org/ -mod_version=0.3.3 +mod_version=0.3.4 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html diff --git a/src/main/java/top/r3944realms/lib39/core/command/ICommandHelpManager.java b/src/main/java/top/r3944realms/lib39/core/command/ICommandHelpManager.java index cca08da..bc479c1 100644 --- a/src/main/java/top/r3944realms/lib39/core/command/ICommandHelpManager.java +++ b/src/main/java/top/r3944realms/lib39/core/command/ICommandHelpManager.java @@ -495,14 +495,9 @@ public interface ICommandHelpManager { */ default boolean toggleNodeExpanded(int hashCode) { CommandNode currentNode = getCache().getOrDefault(hashCode, null); - if (currentNode == null) { + if (currentNode == null || currentNode.getChildren().isEmpty()) { return false; } - - if (currentNode.getChildren().size() <= 1) { - return false; - } - currentNode.toggleExpanded(); return true; }