CommandAPI 9.3.0
An API for the command UI introduced in Minecraft 1.13
com.mojang.brigadier.exceptions.Dynamic4CommandExceptionType Class Reference

A CommandExceptionType taking four inputs and returning a message based on those. More...

+ Inheritance diagram for com.mojang.brigadier.exceptions.Dynamic4CommandExceptionType:

Classes

interface  Function
 A simple Function to compute a Message based on the four input arguments. More...
 

Public Member Functions

 Dynamic4CommandExceptionType (final Function function)
 
CommandSyntaxException create (final Object a, final Object b, final Object c, final Object d)
 Creates a CommandSyntaxException using the four passed arguments. More...
 
CommandSyntaxException createWithContext (final ImmutableStringReader reader, final Object a, final Object b, final Object c, final Object d)
 Creates a CommandSyntaxException using the four passed arguments and includes information about the position and input. More...
 

Detailed Description

A CommandExceptionType taking four inputs and returning a message based on those.

The arguments can be used to e.g. format a message and display the input as well as why it did not match some criteria.

Member Function Documentation

◆ create()

CommandSyntaxException com.mojang.brigadier.exceptions.Dynamic4CommandExceptionType.create ( final Object  a,
final Object  b,
final Object  c,
final Object  d 
)

Creates a CommandSyntaxException using the four passed arguments.

Parameters
athe first argument
bthe second argument
cthe third argument
dthe fourth argument
Returns
a constructed CommandSyntaxException

◆ createWithContext()

CommandSyntaxException com.mojang.brigadier.exceptions.Dynamic4CommandExceptionType.createWithContext ( final ImmutableStringReader  reader,
final Object  a,
final Object  b,
final Object  c,
final Object  d 
)

Creates a CommandSyntaxException using the four passed arguments and includes information about the position and input.

Parameters
readerthe ImmutableStringReader giving information about the input and the place the error occurred
athe first argument
bthe second argument
cthe third argument
dthe fourth argument
Returns
a constructed CommandSyntaxException