Package kr.toxicity.command
Interface CommandArgument<W extends BetterCommandSource>
- Type Parameters:
W- source
- All Known Implementing Classes:
CommandModule
public interface CommandArgument<W extends BetterCommandSource>
Refers command argument
-
Method Summary
Modifier and TypeMethodDescription@NotNull String[]aliases()Gets command aliases<S> @NotNull List<com.mojang.brigadier.builder.LiteralArgumentBuilder<S>>Build a brigadier command@NotNull MessageFunction<W>Gets command description@NotNull Stringname()Gets command name@Nullable StringGets command permission@Nullable net.kyori.adventure.text.ComponentGets usage of this command
-
Method Details
-
name
Gets command name- Returns:
- name
-
description
Gets command description- Returns:
- description
-
build
@NotNull <S> @NotNull List<com.mojang.brigadier.builder.LiteralArgumentBuilder<S>> build(@NotNull @NotNull Function<S, W> mapper) Build a brigadier command- Type Parameters:
S- source class of W (normally it is a CommandSourceStack)- Parameters:
mapper- class wrapper- Returns:
- brigadier command
-
aliases
Gets command aliases- Returns:
- aliases
-
usage
Gets usage of this command- Parameters:
w- source- Returns:
- usage component
-
permission
Gets command permission- Returns:
- permission key or null if not set
-