mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
23 lines
969 B
Diff
23 lines
969 B
Diff
--- a/com/mojang/brigadier/exceptions/CommandSyntaxException.java
|
|
+++ b/com/mojang/brigadier/exceptions/CommandSyntaxException.java
|
|
@@ -5,7 +_,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 +_,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
|
|
}
|