Fix /npc sound dependency being removed

This commit is contained in:
fullwall 2021-04-17 21:34:46 +08:00
parent 3c1d48137d
commit 9562345a7a
1 changed files with 4 additions and 4 deletions

View File

@ -44,9 +44,9 @@ import org.json.simple.parser.JSONParser;
import com.google.common.base.Joiner;
import com.google.common.base.Splitter;
import com.google.common.base.Strings;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.mysql.jdbc.StringUtils;
import net.citizensnpcs.Citizens;
import net.citizensnpcs.Settings.Setting;
@ -2110,9 +2110,9 @@ public class NPCCommands {
if (deathSound != null && deathSound.isEmpty()) {
deathSound = "none";
}
if ((!StringUtils.isNullOrEmpty(ambientSound) && !ambientSound.equals("none"))
|| (!StringUtils.isNullOrEmpty(deathSound) && !deathSound.equals("none"))
|| (!StringUtils.isNullOrEmpty(hurtSound) && !hurtSound.equals("none"))) {
if ((!Strings.isNullOrEmpty(ambientSound) && !ambientSound.equals("none"))
|| (!Strings.isNullOrEmpty(deathSound) && !deathSound.equals("none"))
|| (!Strings.isNullOrEmpty(hurtSound) && !hurtSound.equals("none"))) {
npc.data().setPersistent(NPC.SILENT_METADATA, false);
}
Messaging.sendTr(sender, Messages.SOUND_SET, npc.getName(), ambientSound, hurtSound, deathSound);