修改命令幫助展開邏輯
Some checks failed
Build / build (push) Failing after 20s

This commit is contained in:
叁玖领域 2026-02-17 14:19:51 +08:00
parent 903585d281
commit a9a936eff6
2 changed files with 2 additions and 7 deletions

View File

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

View File

@ -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;
}