Package dev.jorel.commandapi.arguments
Class AdventureChatArgument
java.lang.Object
dev.jorel.commandapi.AbstractArgumentTree<Argument<net.kyori.adventure.text.Component>,Argument<?>,org.bukkit.command.CommandSender>
dev.jorel.commandapi.arguments.AbstractArgument<net.kyori.adventure.text.Component,Argument<net.kyori.adventure.text.Component>,Argument<?>,org.bukkit.command.CommandSender>
dev.jorel.commandapi.arguments.Argument<net.kyori.adventure.text.Component>
dev.jorel.commandapi.arguments.AdventureChatArgument
- All Implemented Interfaces:
GreedyArgument,Previewable<AdventureChatArgument,,net.kyori.adventure.text.Component> BukkitExecutable<Argument<net.kyori.adventure.text.Component>>,ChainableBuilder<Argument<net.kyori.adventure.text.Component>>,PlatformExecutable<Argument<net.kyori.adventure.text.Component>,org.bukkit.command.CommandSender>
public class AdventureChatArgument
extends Argument<net.kyori.adventure.text.Component>
implements GreedyArgument, Previewable<AdventureChatArgument,net.kyori.adventure.text.Component>
An argument that represents chat with entity selectors
- Since:
- 5.10
- API Note:
- Returns a
Componentobject
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> -
Constructor Summary
ConstructorsConstructorDescriptionAdventureChatArgument(String nodeName) Constructs a Chat argument with a given node name. -
Method Summary
Modifier and TypeMethodDescriptionArgument<net.kyori.adventure.text.Component> CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> Optional<PreviewableFunction<net.kyori.adventure.text.Component>> Class<net.kyori.adventure.text.Component> booleanisLegacy()<CommandSourceStack>
net.kyori.adventure.text.ComponentparseArgument(com.mojang.brigadier.context.CommandContext<CommandSourceStack> cmdCtx, String key, CommandArguments previousArgs) voidsetExecutor(CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> arg0) usePreview(boolean usePreview) withPreview(PreviewableFunction<net.kyori.adventure.text.Component> preview) Methods inherited from class dev.jorel.commandapi.arguments.AbstractArgument
combineWith, copyPermissionsAndRequirements, getArgumentPermission, getCombinedArguments, getEntityNames, getHelpString, getIncludedSuggestions, getNodeName, getOverriddenSuggestions, getRawType, getRequirements, hasCombinedArguments, includeSuggestions, isListed, isOptional, replaceSuggestions, setListed, setOptional, toString, withPermission, withPermission, withRequirementMethods inherited from class dev.jorel.commandapi.AbstractArgumentTree
thenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.jorel.commandapi.BukkitExecutable
executes, executes, executes, executes, executesCommandBlock, executesCommandBlock, executesCommandBlock, executesCommandBlock, executesConsole, executesConsole, executesConsole, executesConsole, executesEntity, executesEntity, executesEntity, executesEntity, executesFeedbackForwarding, executesFeedbackForwarding, executesFeedbackForwarding, executesFeedbackForwarding, executesNative, executesNative, executesNative, executesNative, executesPlayer, executesPlayer, executesPlayer, executesPlayer, executesProxy, executesProxy, executesProxy, executesProxy, executesRemoteConsole, executesRemoteConsole, executesRemoteConsole, executesRemoteConsoleMethods inherited from interface dev.jorel.commandapi.PlatformExecutable
getExecutor
-
Field Details
-
executor
protected CommandAPIExecutor<org.bukkit.command.CommandSender,AbstractCommandSender<? extends org.bukkit.command.CommandSender>> executor
-
-
Constructor Details
-
AdventureChatArgument
Constructs a Chat argument with a given node name. Represents fancy greedy strings that can parse entity selectors- Parameters:
nodeName- the name of the node for argument
-
-
Method Details
-
getPrimitiveType
- Specified by:
getPrimitiveTypein classAbstractArgument<net.kyori.adventure.text.Component,Argument<net.kyori.adventure.text.Component>, Argument<?>, org.bukkit.command.CommandSender>
-
getArgumentType
- Specified by:
getArgumentTypein classAbstractArgument<net.kyori.adventure.text.Component,Argument<net.kyori.adventure.text.Component>, Argument<?>, org.bukkit.command.CommandSender>
-
parseArgument
public <CommandSourceStack> net.kyori.adventure.text.Component parseArgument(com.mojang.brigadier.context.CommandContext<CommandSourceStack> cmdCtx, String key, CommandArguments previousArgs) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parseArgumentin classAbstractArgument<net.kyori.adventure.text.Component,Argument<net.kyori.adventure.text.Component>, Argument<?>, org.bukkit.command.CommandSender> - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException
-
withPreview
public AdventureChatArgument withPreview(PreviewableFunction<net.kyori.adventure.text.Component> preview) - Specified by:
withPreviewin interfacePreviewable<AdventureChatArgument,net.kyori.adventure.text.Component>
-
getPreview
- Specified by:
getPreviewin interfacePreviewable<AdventureChatArgument,net.kyori.adventure.text.Component>
-
isLegacy
public boolean isLegacy()- Specified by:
isLegacyin interfacePreviewable<AdventureChatArgument,net.kyori.adventure.text.Component>
-
usePreview
- Specified by:
usePreviewin interfacePreviewable<AdventureChatArgument,net.kyori.adventure.text.Component>
-
getExecutor
public CommandAPIExecutor<org.bukkit.command.CommandSender,AbstractCommandSender<? extends org.bukkit.command.CommandSender>> getExecutor() -
setExecutor
public void setExecutor(CommandAPIExecutor<org.bukkit.command.CommandSender, AbstractCommandSender<? extends org.bukkit.command.CommandSender>> arg0) -
clearExecutors
-