Class Command
java.lang.Object
com.zenith.command.api.Command
- Direct Known Subclasses:
ActionLimiterCommand, ActiveHoursCommand, AntiAFKCommand, AntiKickCommand, AntiLeakCommand, AuthCommand, AutoArmorCommand, AutoDisconnectCommand, AutoDropCommand, AutoEatCommand, AutoFishCommand, AutoMendCommand, AutoOmenCommand, AutoReconnectCommand, AutoReplyCommand, AutoRespawnCommand, AutoTotemCommand, AutoUpdateCommand, ChatHistoryCommand, ChatRelayCommand, ChatSchemaCommand, ClickCommand, ClientConnectionCommand, CommandConfigCommand, ConnectCommand, ConnectionTestCommand, CoordinateObfuscationCommand, DatabaseCommand, DebugCommand, DeprecationWarningCommand, DisconnectCommand, DiscordManageCommand, DiscordNotificationsCommand, DisplayCoordsCommand, ExtraChatCommand, FriendCommand, HelpCommand, IgnoreCommand, InventoryCommand, JvmArgsCommand, KickCommand, KillAuraCommand, LicenseCommand, MapCommand, PathfinderCommand, PearlLoader, PlaytimeCommand, PluginsCommand, PrioCommand, QueueStatusCommand, QueueWarningCommand, RateLimiterCommand, RaycastCommand, ReconnectCommand, ReleaseChannelCommand, ReplayCommand, RequeueCommand, RespawnCommand, RotateCommand, SeenCommand, SendMessageCommand, ServerCommand, ServerConnectionCommand, ServerSwitcherCommand, SessionTimeLimitCommand, SkinCommand, SpammerCommand, SpawnPatrolCommand, SpectatorCommand, SpectatorEntityCommand, SpectatorEntityToggleCommand, SpectatorPlayerCamCommand, SpectatorSwapCommand, SpookCommand, StalkCommand, StatsCommand, StatusCommand, TablistCommand, TasksCommand, ThemeCommand, TransferCommand, UnsupportedCommand, UpdateCommand, ViaVersionCommand, VisualRangeCommand, WaypointsCommand, WhitelistCommand
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ZRequiredArgumentBuilder<CommandContext, T> abstract CommandUsageRequired.voiddefaultEmbed(Embed builder) Override to populate the embed builder after every non-throwing execution, including both success and error cases.voiddefaultErrorHandler(Map<com.mojang.brigadier.tree.CommandNode<CommandContext>, com.mojang.brigadier.exceptions.CommandSyntaxException> exceptions, CommandContext context) voiddefaultExecutionErrorHandler(CommandContext commandContext) voiddefaultExecutionExceptionHandler(CommandContext commandContext, Throwable e) voiddefaultHandler(CommandContext context) Called after every non-throwing execution, including both successes and error cases, overridable.voiddefaultSuccessHandler(CommandContext context) static EnumStringArgumentTypeenumStrings(Enum<?>[] enumValues) static EnumStringArgumentTypeenumStrings(String... strings) static EnumStringArgumentTypeenumStrings(Collection<String> strings) literal(String literal, CommandErrorHandler errorHandler) com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandContext> redirect(String literal, com.mojang.brigadier.tree.CommandNode<CommandContext> destination) Workaround for no-arg redirect nodes see https://github.com/Mojang/brigadier/issues/46 4 years and no official fix T.Tabstract com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandContext> register()Required.requires(String literal, Predicate<CommandContext> requirement) static StringtoggleStr(boolean state) static StringtoggleStrCaps(boolean state) static booleanvalidateAccountOwner(CommandContext context) static booleanvalidateCommandSource(CommandContext context, CommandSource allowedSource) static booleanvalidateCommandSource(CommandContext context, List<CommandSource> allowedSources)
-
Field Details
-
OK
public static final int OK- See Also:
-
ERROR
public static final int ERROR- See Also:
-
-
Constructor Details
-
Command
public Command()
-
-
Method Details
-
argument
public static <T> ZRequiredArgumentBuilder<CommandContext, T> argument(String name, com.mojang.brigadier.arguments.ArgumentType<T> type) -
validateAccountOwner
-
validateCommandSource
public static boolean validateCommandSource(CommandContext context, List<CommandSource> allowedSources) -
validateCommandSource
-
literal
-
literal
public static CaseInsensitiveLiteralArgumentBuilder<CommandContext> literal(String literal, CommandErrorHandler errorHandler) -
requires
public static CaseInsensitiveLiteralArgumentBuilder<CommandContext> requires(String literal, Predicate<CommandContext> requirement) -
enumStrings
-
enumStrings
-
enumStrings
-
toggleStr
-
toggleStrCaps
-
commandUsage
Required. RegistersCommandUsage -
register
Required. Register acommand(String) -
defaultEmbed
Override to populate the embed builder after every non-throwing execution, including both success and error cases. Don't include sensitive info, there is no permission validation. -
defaultHandler
Called after every non-throwing execution, including both successes and error cases, overridable. -
command
-
redirect
public com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandContext> redirect(String literal, com.mojang.brigadier.tree.CommandNode<CommandContext> destination) Workaround for no-arg redirect nodes see https://github.com/Mojang/brigadier/issues/46 4 years and no official fix T.T -
defaultSuccessHandler
-
defaultErrorHandler
public void defaultErrorHandler(Map<com.mojang.brigadier.tree.CommandNode<CommandContext>, com.mojang.brigadier.exceptions.CommandSyntaxException> exceptions, CommandContext context) -
defaultExecutionErrorHandler
-
defaultExecutionExceptionHandler
-