mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Fix PluginCommand to not wrap exceptions before ServerExceptionEvent can get to it (#1130)
This commit is contained in:
@@ -458,7 +458,7 @@ index 00000000..5582999f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index bdc0de8c..762eb1d2 100644
|
||||
index bdc0de8c..4aea03c6 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -0,0 +0,0 @@ import java.util.List;
|
||||
@@ -472,6 +472,11 @@ index bdc0de8c..762eb1d2 100644
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Server;
|
||||
@@ -0,0 +0,0 @@ public class SimpleCommandMap implements CommandMap {
|
||||
target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length));
|
||||
target.timings.stopTiming(); // Spigot
|
||||
} catch (CommandException ex) {
|
||||
+ server.getPluginManager().callEvent(new ServerExceptionEvent(new ServerCommandException(ex, target, sender, args))); // Paper
|
||||
target.timings.stopTiming(); // Spigot
|
||||
throw ex;
|
||||
} catch (Throwable ex) {
|
||||
target.timings.stopTiming(); // Spigot
|
||||
@@ -586,4 +591,6 @@ index 80c152ba..b88f31ca 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
--
|
||||
2.17.0 (Apple Git-106)
|
||||
|
||||
|
Reference in New Issue
Block a user