public abstract class Command<C extends Command<C>> extends Object implements ClientLinked
| Modifier and Type | Class and Description |
|---|---|
class |
Command.Tags |
| Modifier | Constructor and Description |
|---|---|
protected |
Command(@NonNull Client client)
Constructs the command.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
execute()
Executes the command.
|
@NonNull Client |
getClient()
Gets the client on which this command will be run.
|
protected void |
sendCommandLine(@NonNull String line) |
protected void |
sendCommandLine(@NonNull String line,
boolean immediately) |
Command.Tags |
tags() |
String |
toString() |
protected @NonNull ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
protected Command(@NonNull Client client)
client - the clientIllegalArgumentException - if client is nullpublic @NonNull Client getClient()
getClient in interface ClientLinkedpublic abstract void execute()
protected void sendCommandLine(@NonNull String line)
protected void sendCommandLine(@NonNull String line, boolean immediately)
public Command.Tags tags()
protected @NonNull ToStringer toStringer()
ToStringer for the command.Copyright © 2013–2021 Kitteh. All rights reserved.