3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-03 14:50:30 +01:00

Fix #1358 by checking for null before processing

Dieser Commit ist enthalten in:
Myles 2019-05-31 20:43:02 +01:00
Ursprung 89dfcaf626
Commit 0137105a6d
2 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -131,6 +131,7 @@ public class ChatRewriter {
} }
private static void processTranslate(BaseComponent component) { private static void processTranslate(BaseComponent component) {
if (component == null) return;
if (component instanceof TranslatableComponent) { if (component instanceof TranslatableComponent) {
String oldTranslate = ((TranslatableComponent) component).getTranslate(); String oldTranslate = ((TranslatableComponent) component).getTranslate();
String newTranslate; String newTranslate;

Datei anzeigen

@ -18,6 +18,7 @@ public class InventoryNameRewriter {
} }
private static void processTranslate(BaseComponent component) { private static void processTranslate(BaseComponent component) {
if (component == null) return;
if (component instanceof TranslatableComponent) { if (component instanceof TranslatableComponent) {
String oldTranslate = ((TranslatableComponent) component).getTranslate(); String oldTranslate = ((TranslatableComponent) component).getTranslate();