mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Make CommandSyntaxException implement ComponentMessageThrowable (#8513)
This commit is contained in:
parent
731f32f889
commit
3b7ad4bb6f
1 changed files with 25 additions and 0 deletions
|
@ -21,6 +21,31 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
// Paper start
|
// Paper start
|
||||||
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||||
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
||||||
|
diff --git a/src/main/java/com/mojang/brigadier/exceptions/CommandSyntaxException.java b/src/main/java/com/mojang/brigadier/exceptions/CommandSyntaxException.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/com/mojang/brigadier/exceptions/CommandSyntaxException.java
|
||||||
|
+++ b/src/main/java/com/mojang/brigadier/exceptions/CommandSyntaxException.java
|
||||||
|
@@ -0,0 +0,0 @@ package com.mojang.brigadier.exceptions;
|
||||||
|
|
||||||
|
import com.mojang.brigadier.Message;
|
||||||
|
|
||||||
|
-public class CommandSyntaxException extends Exception {
|
||||||
|
+public class CommandSyntaxException extends Exception implements net.kyori.adventure.util.ComponentMessageThrowable { // Paper
|
||||||
|
public static final int CONTEXT_AMOUNT = 10;
|
||||||
|
public static boolean ENABLE_COMMAND_STACK_TRACES = true;
|
||||||
|
public static BuiltInExceptionProvider BUILT_IN_EXCEPTIONS = new BuiltInExceptions();
|
||||||
|
@@ -0,0 +0,0 @@ public class CommandSyntaxException extends Exception {
|
||||||
|
public int getCursor() {
|
||||||
|
return cursor;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // Paper start
|
||||||
|
+ @Override
|
||||||
|
+ public @org.jetbrains.annotations.Nullable net.kyori.adventure.text.Component componentMessage() {
|
||||||
|
+ return io.papermc.paper.brigadier.PaperBrigadier.componentFromMessage(this.message);
|
||||||
|
+ }
|
||||||
|
+ // Paper end
|
||||||
|
}
|
||||||
diff --git a/src/main/java/com/mojang/brigadier/tree/CommandNode.java b/src/main/java/com/mojang/brigadier/tree/CommandNode.java
|
diff --git a/src/main/java/com/mojang/brigadier/tree/CommandNode.java b/src/main/java/com/mojang/brigadier/tree/CommandNode.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/com/mojang/brigadier/tree/CommandNode.java
|
--- a/src/main/java/com/mojang/brigadier/tree/CommandNode.java
|
||||||
|
|
Loading…
Reference in a new issue