mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-23 17:08:15 +01:00
fix npe
This commit is contained in:
parent
d9eff7bb5c
commit
3fc2d28b95
@ -139,8 +139,10 @@ public class ChatRewriter {
|
||||
if (newTranslate != null) {
|
||||
((TranslatableComponent) component).setTranslate(newTranslate);
|
||||
}
|
||||
for (BaseComponent baseComponent : ((TranslatableComponent) component).getWith()) {
|
||||
processTranslate(baseComponent);
|
||||
if (((TranslatableComponent) component).getWith() != null) {
|
||||
for (BaseComponent baseComponent : ((TranslatableComponent) component).getWith()) {
|
||||
processTranslate(baseComponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (component.getHoverEvent() != null) {
|
||||
@ -148,8 +150,10 @@ public class ChatRewriter {
|
||||
processTranslate(baseComponent);
|
||||
}
|
||||
}
|
||||
for (BaseComponent baseComponent : component.getExtra()) {
|
||||
processTranslate(baseComponent);
|
||||
if (component.getExtra() != null) {
|
||||
for (BaseComponent baseComponent : component.getExtra()) {
|
||||
processTranslate(baseComponent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user