You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/paper/dev/api/command-api/basics/custom-arguments.mdx
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,6 +192,15 @@ default <S> T convert(final N nativeType, final S source) throws CommandSyntaxEx
192
192
These methods work similarly to the `parse` methods, but they instead provide you with the parsed, native type instead of a `StringReader`.
193
193
This reduced the need to manually do string reader operations and instead directly uses the native type's parsing rules.
194
194
195
+
## Error handling during the suggestions phase
196
+
In case you are looking for the ability to make the client show currently typed input as red to display invalid input, it should be noted that this is **not possible** with
197
+
custom arguments. The client is only able to validate arguments it knows about and there is no way to throw a `CommandSyntaxException` during the suggestions phase. The only way to
198
+
achieve that is by using **literals**, but those cannot be modified dynamically during server runtime.
In case you are looking for the ability to make the client show currently typed input as red to display invalid input, it should be noted that this is **not possible** with
281
-
custom arguments. The client is only able to validate arguments it knows about and there is no way to throw a `CommandSyntaxException` during the suggestions phase. The only way to
282
-
achieve that is by using **literals**, but those cannot be modified dynamically during server runtime.
0 commit comments