@@ -45,23 +45,21 @@ static Builder builder() {
4545 }
4646
4747 /**
48- * Builds a result that indicates successes.
48+ * Builds a result that indicates success (where {@link Builder#result(int)}
49+ * is set to 1.
50+ *
51+ * <p>Note that a successful result is one where the command has done what
52+ * is expected of it. This should be used in place of "empty" from previous
53+ * API iterations. If an error condition should be reported, use
54+ * {@link #error(Component)} instead, which will allow the system to react
55+ * accordingly.</p>
4956 *
5057 * @return The {@link CommandResult}
5158 */
5259 static CommandResult success () {
5360 return CommandResults .SUCCESS ;
5461 }
5562
56- /**
57- * Builds an empty result.
58- *
59- * @return The {@link CommandResult}
60- */
61- static CommandResult empty () {
62- return CommandResults .EMPTY ;
63- }
64-
6563 /**
6664 * Builds an empty result that will prompt the command manager to send an
6765 * error message without throwing an exception.
@@ -105,7 +103,8 @@ interface Builder extends org.spongepowered.api.util.Builder<CommandResult, Buil
105103 *
106104 * <ul>
107105 * <li>A positive value indicates successful execution,</li>
108- * <li>Zero indicates the command didn't fulfil its task</li>
106+ * <li>Zero (generally) indicates the command didn't fulfil its
107+ * task, though that is not necessarily an error condition.</li>
109108 * <li>A negative value is undefined in the API, if returned, the
110109 * effects are implementation specific.</li>
111110 * </ul>
@@ -116,11 +115,12 @@ interface Builder extends org.spongepowered.api.util.Builder<CommandResult, Buil
116115 Builder result (int result );
117116
118117 /**
119- * Sets or removes the error message to return to the user without
120- * throwing an exception .
118+ * Sets the built result to report an error, with an optional error
119+ * message .
121120 *
122121 * <p>If this is set, then the command parser will send this message to
123- * the command invoker.</p>
122+ * the command invoker. Otherwise, the parser will report an unknown
123+ * exception.</p>
124124 *
125125 * @param errorMessage The message to send to the user.
126126 * @return This builder, for chaining
0 commit comments