public class ChannelModeCommand extends ChannelCommand<ChannelModeCommand>
Command.Tags| Constructor and Description |
|---|
ChannelModeCommand(@NonNull Client client,
@NonNull String channel)
Constructs a MODE command for a given channel.
|
| Modifier and Type | Method and Description |
|---|---|
@NonNull ChannelModeCommand |
add(ModeStatus.Action action,
@NonNull ChannelMode mode)
Adds a mode change without a parameter.
|
@NonNull ChannelModeCommand |
add(ModeStatus.Action action,
@NonNull ChannelMode mode,
@NonNull String parameter)
Adds a mode change.
|
@NonNull ChannelModeCommand |
add(ModeStatus.Action action,
@NonNull ChannelUserMode mode,
@NonNull User parameter)
Adds a mode change.
|
void |
execute()
Executes the command.
|
protected @NonNull ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
getChannelgetClient, sendCommandLine, sendCommandLine, tags, toStringpublic ChannelModeCommand(@NonNull Client client, @NonNull String channel)
client - the client on which this command is executingchannel - channel targetedIllegalArgumentException - if null parameterspublic @NonNull ChannelModeCommand add(ModeStatus.Action action, @NonNull ChannelMode mode)
action - adding or removingmode - the mode to be changedIllegalArgumentException - if mode invalidpublic @NonNull ChannelModeCommand add(ModeStatus.Action action, @NonNull ChannelMode 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 @NonNull ChannelModeCommand add(ModeStatus.Action action, @NonNull ChannelUserMode mode, @NonNull User parameter)
action - adding or removingmode - the mode to be changedparameter - user whose nick will be sentIllegalArgumentException - if mode invalid or either mode or
user comes from a different client or parameter is nullpublic void execute()
Commandexecute in class Command<ChannelCommand<ChannelModeCommand>>protected @NonNull ToStringer toStringer()
CommandToStringer for the command.toStringer in class ChannelCommand<ChannelModeCommand>Copyright © 2013–2021 Kitteh. All rights reserved.