mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-05 02:10:10 +01:00
Fix /npc sound -n bug
This commit is contained in:
parent
b278fab812
commit
3cef996a24
@ -37,6 +37,7 @@ import com.google.common.base.Joiner;
|
|||||||
import com.google.common.base.Splitter;
|
import com.google.common.base.Splitter;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import com.mysql.jdbc.StringUtils;
|
||||||
|
|
||||||
import net.citizensnpcs.Citizens;
|
import net.citizensnpcs.Citizens;
|
||||||
import net.citizensnpcs.Settings.Setting;
|
import net.citizensnpcs.Settings.Setting;
|
||||||
@ -1746,7 +1747,8 @@ public class NPCCommands {
|
|||||||
if (deathSound != null && deathSound.isEmpty()) {
|
if (deathSound != null && deathSound.isEmpty()) {
|
||||||
deathSound = "none";
|
deathSound = "none";
|
||||||
}
|
}
|
||||||
if (ambientSound != null || deathSound != null || hurtSound != null) {
|
if (!StringUtils.isNullOrEmpty(ambientSound) || !StringUtils.isNullOrEmpty(deathSound)
|
||||||
|
|| !StringUtils.isNullOrEmpty(hurtSound)) {
|
||||||
npc.data().setPersistent(NPC.SILENT_METADATA, false);
|
npc.data().setPersistent(NPC.SILENT_METADATA, false);
|
||||||
}
|
}
|
||||||
Messaging.sendTr(sender, Messages.SOUND_SET, npc.getName(), ambientSound, hurtSound, deathSound);
|
Messaging.sendTr(sender, Messages.SOUND_SET, npc.getName(), ambientSound, hurtSound, deathSound);
|
||||||
|
Loading…
Reference in New Issue
Block a user