public class ChannelModeCommand extends ChannelCommand
| Constructor and Description |
|---|
ChannelModeCommand(Client client,
String channel)
Constructs a MODE command for a given channel.
|
| Modifier and Type | Method and Description |
|---|---|
ChannelModeCommand |
add(boolean add,
ChannelMode mode)
Adds a mode change without a parameter.
|
ChannelModeCommand |
add(boolean add,
ChannelMode mode,
String parameter)
Adds a mode change.
|
ChannelModeCommand |
add(boolean add,
ChannelUserMode mode,
User parameter)
Adds a mode change.
|
void |
execute()
Executes the command.
|
protected ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
getChannelpublic ChannelModeCommand(@Nonnull Client client, @Nonnull String channel)
client - the client on which this command is executingchannel - channel targetedIllegalArgumentException - if null parameters@Nonnull public ChannelModeCommand add(boolean add, @Nonnull ChannelMode mode)
add - true if adding, false if removingmode - the mode to be changedIllegalArgumentException - if mode invalid@Nonnull public ChannelModeCommand add(boolean add, @Nonnull ChannelMode mode, @Nonnull String parameter)
add - true if adding, false if removingmode - the mode to be changedparameter - mode parameterIllegalArgumentException - if mode invalid comes from a
different client or parameter is null@Nonnull public ChannelModeCommand add(boolean add, @Nonnull ChannelUserMode mode, @Nonnull User parameter)
add - true if adding, false if 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()
Command@Nonnull protected ToStringer toStringer()
CommandToStringer for the command.toStringer in class ChannelCommandCopyright © 2013–2019 Kitteh. All rights reserved.