This commit is contained in:
kento2 2026-08-29 16:35:54 +02:00
parent 35a0784e40
commit 0cf84f5419
19 changed files with 66 additions and 47 deletions

View file

@ -4,6 +4,7 @@ import de.kentoj.scrow.bukkit.command.ScrowBukkitCC;
import de.kentoj.scrowlib.convention.ScrowMessageStyle;
import org.jetbrains.annotations.Nullable;
import site.lab0x13.scrow.commands.model.literal.Literal;
import site.lab0x13.scrow.commands.model.literal.LiteralMeta;
import site.lab0x13.scrow.configurator.ConfigApi;
import site.lab0x13.scrow.configurator.action.ConfigAction;
import site.lab0x13.scrow.configurator.node.ConfigNode;
@ -18,7 +19,7 @@ class KeyLiteral {
KeyLiteral(ConfigApi api) {
this.api = api;
literal = Literal.<ScrowBukkitCC>dynamic("key")
.withSubLiteralNames(() -> new ArrayList<>(api.allNodes().keySet()))
.withSubLiteralMetas(() -> api.allNodes().keySet().stream().map(LiteralMeta::of).toList())
.withSubLiteralProvider(this::keyLiteral)
.build();
}