From e62f3ae259f17bc8feb415e47f5c360b3d1873eb Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sat, 22 Sep 2018 15:58:13 -0400 Subject: [PATCH] Return null if we get a ParseException in IChatBaseComponent Fixes GH-1471, GH-1474 As a result, data that no longer parses correctly will not crash the server instead just logging the exception and continuing (and in most cases should fix the data) Player data is fixed pretty much immediately but some block data (like Shulkers) may need to be modified in-game in order for it to re-save properly No more crashing though. --- ...e-get-a-ParseException-in-IChatBaseC.patch | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Spigot-Server-Patches/0380-Return-null-if-we-get-a-ParseException-in-IChatBaseC.patch diff --git a/Spigot-Server-Patches/0380-Return-null-if-we-get-a-ParseException-in-IChatBaseC.patch b/Spigot-Server-Patches/0380-Return-null-if-we-get-a-ParseException-in-IChatBaseC.patch new file mode 100644 index 0000000000..3fc1f7aba0 --- /dev/null +++ b/Spigot-Server-Patches/0380-Return-null-if-we-get-a-ParseException-in-IChatBaseC.patch @@ -0,0 +1,41 @@ +From a0d5ac4f248c2c822d9a070ce284d684cf0eccf6 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Sat, 22 Sep 2018 15:56:59 -0400 +Subject: [PATCH] Return null if we get a ParseException in IChatBaseComponent + +This is allowed as the method is explicitly marked as nullable and is +preferable to returning an empty string in this instance. + +As a result, data that no longer parses correctly will not crash the server +instead just logging the exception and continuing (and in most cases should +fix the data) + +Player data is fixed pretty much immediately but some block data (like +Shulkers) may need to be changed in order for it to re-save properly + +No more crashing though. + +diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java +index ff14b3e09..03c148f4f 100644 +--- a/src/main/java/net/minecraft/server/IChatBaseComponent.java ++++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java +@@ -357,7 +357,15 @@ public interface IChatBaseComponent extends Message, Iterable