Released 3.2 - Added more sounds

This commit is contained in:
Andrew 2013-05-21 13:19:46 +12:00
parent 2ff2acb3a1
commit abe1a93000
2 changed files with 22 additions and 7 deletions

View file

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>LibsDisguises</groupId> <groupId>LibsDisguises</groupId>
<artifactId>LibsDisguises</artifactId> <artifactId>LibsDisguises</artifactId>
<version>v3.0</version> <version>v3.2</version>
<build> <build>
<sourceDirectory>src</sourceDirectory> <sourceDirectory>src</sourceDirectory>
<defaultGoal>clean package</defaultGoal> <defaultGoal>clean package</defaultGoal>

View file

@ -69,18 +69,34 @@ public class LibsDisguises extends JavaPlugin {
String mobName = dis.getType().name().toLowerCase().replace("_", ""); String mobName = dis.getType().name().toLowerCase().replace("_", "");
if (dis.getType() == DisguiseType.WITHER_SKELETON) if (dis.getType() == DisguiseType.WITHER_SKELETON)
mobName = "skeleton"; mobName = "skeleton";
else if (dis.getType() == DisguiseType.OCELOT) else if (dis.getType() == DisguiseType.CAVE_SPIDER)
mobName = "cat"; mobName = "spider";
else if (dis.getType() == DisguiseType.ENDERMAN)
mobName = "endermen";
else if (dis.getType() == DisguiseType.MUSHROOM_COW)
mobName = "cow";
if (soundName.startsWith("step.")) { if (soundName.startsWith("step.")) {
if (sounds.contains("mob." + mobName + ".walk")) if (sounds.contains("mob." + mobName + ".walk"))
sound = "mob." + mobName + ".walk"; sound = "mob." + mobName + ".walk";
else if (sounds.contains("mob." + mobName + ".step")) else if (sounds.contains("mob." + mobName + ".step"))
sound = "mob." + mobName + ".step"; sound = "mob." + mobName + ".step";
} else if (soundName.equals("damage.hit")) { } else if (soundName.equals("damage.hit")) {
if (sounds.contains("mob." + mobName + ".hit")) if (dis.getType() == DisguiseType.SNOWMAN
|| dis.getType() == DisguiseType.VILLAGER
|| dis.getType() == DisguiseType.WITCH) {
event.setCancelled(true);
return;
}
if (dis.getType() == DisguiseType.PIG_ZOMBIE)
sound = "mob.zombiepig.zpighurt";
else if (dis.getType() == DisguiseType.GHAST)
sound = "mob.ghast.scream";
else if (dis.getType() == DisguiseType.OCELOT)
sound = "mob.cat.hitt";
else if (mobName.equals("slime"))
sound = "mob.slime.attack";
else if (sounds.contains("mob." + mobName + ".hit"))
sound = "mob." + mobName + ".hit"; sound = "mob." + mobName + ".hit";
else if (sounds.contains("mob." + mobName + ".hitt"))
sound = "mob." + mobName + ".hitt";
else if (sounds.contains("mob." + mobName + ".hurt")) else if (sounds.contains("mob." + mobName + ".hurt"))
sound = "mob." + mobName + ".hurt"; sound = "mob." + mobName + ".hurt";
else if (sounds.contains("mob." + mobName + ".say")) else if (sounds.contains("mob." + mobName + ".say"))
@ -89,7 +105,6 @@ public class LibsDisguises extends JavaPlugin {
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ex.printStackTrace();
} }
System.out.print(sound);
if (sound != null) { if (sound != null) {
mods.write(0, sound); mods.write(0, sound);
} }