2020-04-20 00:15:29 +02:00
|
|
|
--- a/com/mojang/brigadier/exceptions/CommandSyntaxException.java
|
|
|
|
+++ b/com/mojang/brigadier/exceptions/CommandSyntaxException.java
|
2024-12-13 16:52:45 +01:00
|
|
|
@@ -5,7 +_,7 @@
|
2020-04-20 00:15:29 +02:00
|
|
|
|
|
|
|
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();
|
2024-12-13 16:52:45 +01:00
|
|
|
@@ -73,4 +_,11 @@
|
2020-04-20 00:15:29 +02:00
|
|
|
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
|
|
|
|
}
|