mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-27 03:28:45 +01:00
Fix /npc sound - too many sounds to list valid ones
This commit is contained in:
parent
a807ee1f38
commit
599d5dd35d
@ -12,7 +12,6 @@ import org.bukkit.DyeColor;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.command.BlockCommandSender;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -1482,8 +1481,7 @@ public class NPCCommands {
|
||||
String deathSound = npc.data().get(NPC.DEATH_SOUND_METADATA);
|
||||
String hurtSound = npc.data().get(NPC.HURT_SOUND_METADATA);
|
||||
if (args.getValueFlags().size() == 0 && args.getFlags().size() == 0) {
|
||||
Messaging.sendTr(sender, Messages.SOUND_INFO, npc.getName(), ambientSound, hurtSound, deathSound,
|
||||
Util.listValuesPretty(Sound.values()));
|
||||
Messaging.sendTr(sender, Messages.SOUND_INFO, npc.getName(), ambientSound, hurtSound, deathSound);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1519,11 +1517,11 @@ public class NPCCommands {
|
||||
npc.data().setPersistent(NPC.AMBIENT_SOUND_METADATA, ambientSound);
|
||||
}
|
||||
|
||||
if (ambientSound.isEmpty())
|
||||
if (ambientSound != null && ambientSound.isEmpty())
|
||||
ambientSound = "none";
|
||||
if (hurtSound.isEmpty())
|
||||
if (hurtSound != null && hurtSound.isEmpty())
|
||||
hurtSound = "none";
|
||||
if (deathSound.isEmpty())
|
||||
if (deathSound != null && deathSound.isEmpty())
|
||||
deathSound = "none";
|
||||
Messaging.sendTr(sender, Messages.SOUND_SET, npc.getName(), ambientSound, hurtSound, deathSound);
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ citizens.commands.npc.size.description=[[{0}]]''s size is [[{1}]].
|
||||
citizens.commands.npc.size.set=[[{0}]]''s size set to [[{1}]].
|
||||
citizens.commands.npc.sound.invalid-sound=Invalid sound.
|
||||
citizens.commands.npc.sound.set=[[{0}]]''s sounds are now: ambient - [[{1}]] hurt - [[{2}]] and death - [[{3}]].
|
||||
citizens.commands.npc.sound.info=[[{0}]]''s sounds are: ambient - [[{1}]] hurt - [[{2}]] and death - [[{3}]].<br><br>Valid sounds are {4}.
|
||||
citizens.commands.npc.sound.info=[[{0}]]''s sounds are: ambient - [[{1}]] hurt - [[{2}]] and death - [[{3}]].
|
||||
citizens.commands.npc.skeletontype.set={0}''s skeleton type set to [[{1}]].
|
||||
citizens.commands.npc.skeletontype.invalid-type=Invalid skeleton type. Try one of the following: [[{0}]].
|
||||
citizens.commands.npc.spawn.already-spawned=[[{0}]] is already spawned at another location. Use ''/npc tphere'' to teleport the NPC to your location.
|
||||
|
Loading…
Reference in New Issue
Block a user