Skip to content

Commit

Permalink
reuse extrainfo in crash report
Browse files Browse the repository at this point in the history
  • Loading branch information
granny committed Jun 17, 2024
1 parent fa88174 commit 04a9fec
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions patches/server/0001-Rebrand.patch
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,35 @@ index 790bad0494454ca12ee152e3de6da3da634d9b20..a6e5950b5875cafd734300cdfbf58f5d

@Override
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
index 589a8bf75be6ccc59f1e5dd5d8d9afed41c4772d..ccdaceb558c310ce1f7cf6b600646e06772fe9d8 100644
index 589a8bf75be6ccc59f1e5dd5d8d9afed41c4772d..7eabcb453ef655741c4802d2f574932d6d741631 100644
--- a/src/main/java/net/minecraft/CrashReport.java
+++ b/src/main/java/net/minecraft/CrashReport.java
@@ -144,7 +144,7 @@ public class CrashReport {
@@ -32,6 +32,7 @@ public class CrashReport {
private boolean trackingStackTrace = true;
private StackTraceElement[] uncategorizedStackTrace = new StackTraceElement[0];
private final SystemReport systemReport = new SystemReport();
+ private List<String> extraInfo = List.of("", "DO NOT REPORT THIS TO PAPER! REPORT TO PURPUR INSTEAD!", ""); // Purpur - Rebrand

public CrashReport(String message, Throwable cause) {
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(cause); // Paper
@@ -144,7 +145,7 @@ public class CrashReport {
}

public String getFriendlyReport(ReportType type) {
- return this.getFriendlyReport(type, List.of());
+ return this.getFriendlyReport(type, List.of("", "DO NOT REPORT THIS TO PAPER! REPORT TO PURPUR INSTEAD!", "")); // Purpur - Rebrand
+ return this.getFriendlyReport(type, extraInfo); // Purpur - Rebrand
}

@Nullable
@@ -191,7 +192,7 @@ public class CrashReport {
}

public boolean saveToFile(Path path, ReportType type) {
- return this.saveToFile(path, type, List.of());
+ return this.saveToFile(path, type, extraInfo); // Purpur - Rebrand
}

public SystemReport getSystemReport() {
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
index 4e56018b64d11f76c8da43fd8f85c6de72204e36..9607675e6c5bff2183c4420d11fc63eeb5747fb6 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
Expand Down

0 comments on commit 04a9fec

Please sign in to comment.