mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-29 15:07:36 +02:00
21 lines
687 B
Java
21 lines
687 B
Java
package net.minestom.server.command.builder;
|
|
|
|
import net.minestom.server.command.CommandSender;
|
|
import net.minestom.server.command.builder.arguments.Argument;
|
|
|
|
/**
|
|
* Callback executed when an error is found within the {@link Argument}
|
|
*/
|
|
@FunctionalInterface
|
|
public interface ArgumentCallback {
|
|
|
|
/**
|
|
* Executed when an error is found
|
|
*
|
|
* @param source the sender which executed the command
|
|
* @param value the raw string argument which is responsible for the error
|
|
* @param error the error id (you can check its meaning in the specific argument class or ask the developer about it)
|
|
*/
|
|
void apply(CommandSender source, String value, int error);
|
|
}
|