Skip to content

Commit

Permalink
[2.1.0-15] 移除测试信息
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanscarlos committed Feb 25, 2023
1 parent d1b28ec commit f7e07a8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import taboolib.common.platform.command.component.CommandComponentLiteral
import taboolib.common.platform.command.suggest
import taboolib.common.platform.command.suggestPlayers
import taboolib.common.platform.function.adaptCommandSender
import taboolib.common.platform.function.info
import taboolib.expansion.createHelper
import taboolib.library.configuration.ConfigurationSection
import taboolib.module.kether.printKetherErrorMessage
Expand All @@ -38,11 +37,8 @@ class CommandComponentBuilder(val id: String, val section: ConfigurationSection,
}

section.getConfigurationSection("literal")?.let { next ->
info("inner has literal...")
for (literal in next.getKeys(false)) {
info("inner load literal $literal")
val node = next.getConfigurationSection(literal) ?: continue
info("inner load literal $literal x2")
children += CommandComponentBuilder(literal, node, legacy)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,17 @@ class CustomCommand(

// 加载所有节点
for (key in section.getKeys(false)) {
info("load component $key")
val node = section.getConfigurationSection(key) ?: continue
info("load component $key x2")
loaded[key] = CommandComponentBuilder(key, node, false)
}

// 处理父子节点关系
for (builder in loaded.values) {
val parent = builder.section.getString("parent") ?: "main"
info("builder ${builder.id} parent $parent")

if (parent == "main") {
info("builder ${builder.id} to entry")
entry += builder
} else {
info("builder ${builder.id} to other node")
loaded[parent]?.children?.plusAssign(builder)
}
}
Expand All @@ -110,11 +105,8 @@ class CustomCommand(
}

section.getConfigurationSection("literal")?.let { next ->
info("has literal...")
for (literal in next.getKeys(false)) {
info("load literal $literal")
val node = next.getConfigurationSection(literal) ?: continue
info("load literal $literal x2")
root.children += CommandComponentBuilder(literal, node, true).build(root.index + 1)
}
}
Expand Down

0 comments on commit f7e07a8

Please sign in to comment.