Tempfix all the things

This commit is contained in:
fullwall 2012-05-17 23:55:25 +08:00
parent 6db2fa9ca6
commit ad31ba7221
3 changed files with 6 additions and 3 deletions

View File

@ -24,7 +24,8 @@ public class Powered extends Trait implements Toggleable {
@Override
public void onNPCSpawn() {
((Creeper) npc.getBukkitEntity()).setPowered(powered);
if (npc.getBukkitEntity() instanceof Creeper)
((Creeper) npc.getBukkitEntity()).setPowered(powered);
}
@Override

View File

@ -28,7 +28,8 @@ public class Saddle extends Trait implements Toggleable, Listener {
@Override
public void onNPCSpawn() {
((Pig) npc.getBukkitEntity()).setSaddle(saddle);
if (npc.getBukkitEntity() instanceof Pig)
((Pig) npc.getBukkitEntity()).setSaddle(saddle);
}
@EventHandler

View File

@ -33,7 +33,8 @@ public class WoolColor extends Trait implements Listener {
@Override
public void onNPCSpawn() {
((Sheep) npc.getBukkitEntity()).setColor(color);
if (npc.getBukkitEntity() instanceof Sheep)
((Sheep) npc.getBukkitEntity()).setColor(color);
}
@EventHandler