public abstract class NoInputCommandParameters extends java.lang.Object implements CommandParameters
CommandParameters
for situations where it is needed,
but there is no user input available.Modifier and Type | Class and Description |
---|---|
static interface |
NoInputCommandParameters.Builder |
EMPTY
Modifier and Type | Method and Description |
---|---|
static NoInputCommandParameters.Builder |
builder() |
ArgumentConverterAccess |
getConverters()
Get the converters used in this call.
|
CommandMetadata |
getMetadata()
Gets the metadata for the command being called.
|
boolean |
has(CommandPart part)
Checks if the parameters contain the specified part.
|
<T> java.util.Optional<T> |
injectedValue(Key<T> key,
InjectedValueAccess context)
Get an injected value, resolving other injected values under the given context.
|
CommandValue |
valueOf(ArgAcceptingCommandPart part)
Gets the value of the specified part, throwing if it
is not present or if
there are multiple values.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
injectedValue
public static NoInputCommandParameters.Builder builder()
public boolean has(CommandPart part)
CommandParameters
has
in interface CommandParameters
part
- - the part to look forpublic CommandValue valueOf(ArgAcceptingCommandPart part)
CommandParameters
valueOf
in interface CommandParameters
part
- - the part to look for@Nullable public CommandMetadata getMetadata()
CommandParameters
getMetadata
in interface CommandParameters
public ArgumentConverterAccess getConverters()
CommandParameters
getConverters
in interface CommandParameters
public <T> java.util.Optional<T> injectedValue(Key<T> key, InjectedValueAccess context)
InjectedValueAccess
Provide value injectors to a store.
This alternative to InjectedValueAccess.injectedValue(Key)
is provided mostly for
wrapping classes to function properly.
injectedValue
in interface InjectedValueAccess
Optional.empty()
if not providedInjectedValueStore.injectValue(Key, ValueProvider)