|
@@ -29,6 +29,7 @@ import com.dmdirc.interfaces.CommandController;
|
29
|
29
|
import com.dmdirc.ui.messages.Styliser;
|
30
|
30
|
|
31
|
31
|
import javax.annotation.Nonnull;
|
|
32
|
+import javax.annotation.Nullable;
|
32
|
33
|
|
33
|
34
|
/**
|
34
|
35
|
* Represents a generic command.
|
|
@@ -58,7 +59,7 @@ public abstract class Command {
|
58
|
59
|
* @param type The type of message to send
|
59
|
60
|
* @param args The arguments of the message
|
60
|
61
|
*/
|
61
|
|
- protected final void sendLine(final FrameContainer target,
|
|
62
|
+ protected final void sendLine(@Nullable final FrameContainer target,
|
62
|
63
|
final boolean isSilent, final String type, final Object... args) {
|
63
|
64
|
if (!isSilent && target != null) {
|
64
|
65
|
target.addLine(type, args);
|
|
@@ -73,7 +74,7 @@ public abstract class Command {
|
73
|
74
|
* @param name The name of the command that's raising the error
|
74
|
75
|
* @param args The arguments that the command accepts or expects
|
75
|
76
|
*/
|
76
|
|
- protected final void showUsage(final FrameContainer target,
|
|
77
|
+ protected final void showUsage(@Nullable final FrameContainer target,
|
77
|
78
|
final boolean isSilent, final String name, final String args) {
|
78
|
79
|
sendLine(target, isSilent, "commandUsage",
|
79
|
80
|
controller.getCommandChar(),
|