mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 06:02:12 -07:00
Brigadier Mojang API
Adds AsyncPlayerSendCommandsEvent - Allows modifying on a per command basis what command data they see. Adds CommandRegisteredEvent - Allows manipulating the CommandNode to add more children/metadata for the client
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
--- a/com/mojang/brigadier/exceptions/CommandSyntaxException.java
|
||||
+++ b/com/mojang/brigadier/exceptions/CommandSyntaxException.java
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import com.mojang.brigadier.Message;
|
||||
|
||||
-public class CommandSyntaxException extends Exception {
|
||||
+public class CommandSyntaxException extends Exception implements net.kyori.adventure.util.ComponentMessageThrowable { // Paper - Brigadier API
|
||||
public static final int CONTEXT_AMOUNT = 10;
|
||||
public static boolean ENABLE_COMMAND_STACK_TRACES = true;
|
||||
public static BuiltInExceptionProvider BUILT_IN_EXCEPTIONS = new BuiltInExceptions();
|
||||
@@ -73,4 +73,11 @@
|
||||
public int getCursor() {
|
||||
return cursor;
|
||||
}
|
||||
+
|
||||
+ // Paper start - Brigadier API
|
||||
+ @Override
|
||||
+ public @org.jetbrains.annotations.Nullable net.kyori.adventure.text.Component componentMessage() {
|
||||
+ return io.papermc.paper.brigadier.PaperBrigadier.componentFromMessage(this.message);
|
||||
+ }
|
||||
+ // Paper end - Brigadier API
|
||||
}
|
Reference in New Issue
Block a user