Package org.spongepowered.api.command
Interface CommandCompletion
-
public interface CommandCompletion
A potential completion of a command argument.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
CommandCompletion.Factory
A factory for constructingCommandCompletion
s
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description String
completion()
The potential completion that this object represents.static CommandCompletion
of(@NonNull String completion)
Creates a basic completion that only containsString
that a given input may be completed to.static CommandCompletion
of(@NonNull String completion, @Nullable Component tooltip)
Creates a completion that containsString
that a given input may be completed to, and an associated tooltip.Optional<Component>
tooltip()
The tooltip that may be displayed by the client when hovering over this completion.
-
-
-
Method Detail
-
of
static CommandCompletion of(@NonNull String completion)
Creates a basic completion that only containsString
that a given input may be completed to.- Parameters:
completion
- The potential completion- Returns:
- The
CommandCompletion
object
-
of
static CommandCompletion of(@NonNull String completion, @Nullable Component tooltip)
Creates a completion that containsString
that a given input may be completed to, and an associated tooltip.- Parameters:
completion
- The potential completiontooltip
- The tooltip- Returns:
- The
CommandCompletion
object
-
completion
String completion()
The potential completion that this object represents.- Returns:
- The completion
-
-