public class UserModeCommand extends Command<UserModeCommand>
Command.Tags| Constructor and Description |
|---|
UserModeCommand(@NonNull Client client)
Constructs a MODE command for a given user.
|
| Modifier and Type | Method and Description |
|---|---|
@NonNull UserModeCommand |
add(ModeStatus.Action action,
@NonNull UserMode mode)
Adds a mode change without a parameter.
|
@NonNull UserModeCommand |
add(ModeStatus.Action action,
@NonNull UserMode mode,
@NonNull String parameter)
Adds a mode change.
|
void |
execute()
Executes the command.
|
protected @NonNull ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
getClient, sendCommandLine, sendCommandLine, tags, toStringpublic UserModeCommand(@NonNull Client client)
client - the client on which this command is executingIllegalArgumentException - if null parameterspublic @NonNull UserModeCommand add(ModeStatus.Action action, @NonNull UserMode mode)
action - adding or removingmode - the mode to be changedIllegalArgumentException - if mode invalidpublic @NonNull UserModeCommand add(ModeStatus.Action action, @NonNull UserMode mode, @NonNull String parameter)
action - adding or removingmode - the mode to be changedparameter - mode parameterIllegalArgumentException - if mode invalid comes from a
different client or parameter is nullpublic void execute()
Commandexecute in class Command<UserModeCommand>protected @NonNull ToStringer toStringer()
CommandToStringer for the command.toStringer in class Command<UserModeCommand>Copyright © 2013–2021 Kitteh. All rights reserved.