Avoid NullPointerException

This commit is contained in:
filoghost 2021-05-24 22:17:13 +02:00
parent 9e05bb61cb
commit 123e9fb45c

View File

@ -108,6 +108,11 @@ class PacketListener extends PacketAdapter {
NMSArmorStand nmsArmorStand = (NMSArmorStand) nmsEntity;
String customName = nmsArmorStand.getCustomNameStringNMS();
if (customName == null || customName.isEmpty()) {
return;
}
String customNameWithRelativePlaceholders = replaceRelativePlaceholders(textLine, customName, player);
if (customNameWithRelativePlaceholders.equals(customName)) {