Class Command
java.lang.Object
com.zenith.command.api.Command
- Direct Known Subclasses:
ActionLimiterCommand,ActiveHoursCommand,AntiAFKCommand,AntiKickCommand,AntiLeakCommand,AuthCommand,AutoArmorCommand,AutoDisconnectCommand,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,ThemeCommand,TransferCommand,UnsupportedCommand,UpdateCommand,ViaVersionCommand,VisualRangeCommand,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 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) voiddefaultSuccessHandler(CommandContext context) static EnumStringArgumentTypeenumStrings(Enum<?>[] enumValues) static EnumStringArgumentTypeenumStrings(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
-
toggleStr
-
toggleStrCaps
-
commandUsage
Required. RegistersCommandUsage -
register
Required. Register acommand(java.lang.String) -
defaultEmbed
Override to populate the embed builder after every execution, including both success and error cases. Don't include sensitive info, there is no permission validation. -
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
-