mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 18:27:17 +01:00
05f977e3d1
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
23 lines
970 B
Diff
23 lines
970 B
Diff
--- 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
|
|
}
|