public class SetNameCommand extends Command<SetNameCommand>
Command.Tags| Constructor and Description |
|---|
SetNameCommand(@NonNull Client client)
Constructs the command.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Executes the command.
|
@NonNull SetNameCommand |
newName(@Nullable String newName)
Sets the new name.
|
protected @NonNull ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
getClient, sendCommandLine, sendCommandLine, tags, toStringpublic SetNameCommand(@NonNull Client client)
client - the clientIllegalArgumentException - if client is nullpublic @NonNull SetNameCommand newName(@Nullable String newName)
newName - new nameIllegalArgumentException - for invalid messagepublic void execute()
Commandexecute in class Command<SetNameCommand>protected @NonNull ToStringer toStringer()
CommandToStringer for the command.toStringer in class Command<SetNameCommand>Copyright © 2013–2021 Kitteh. All rights reserved.