Player skin changes

This commit is contained in:
fullwall 2014-04-05 15:28:39 +08:00
parent 54bd62c414
commit 99862ecf06
2 changed files with 3 additions and 2 deletions

View File

@ -162,7 +162,8 @@ public class Controllable extends Trait implements Toggleable, CommandConfigurab
@Override
public void run() {
if (!enabled || !npc.isSpawned() || getHandle().passenger == null)
if (!enabled || !npc.isSpawned() || getHandle().passenger == null
|| !(getHandle().passenger.getBukkitEntity() instanceof Player))
return;
controller.run((Player) getHandle().passenger.getBukkitEntity());
}

View File

@ -104,7 +104,7 @@ public class PlayerSkin extends Trait {
if (entity instanceof LivingEntity) {
LivingEntity le = (LivingEntity) entity;
le.setRemainingAir(20);
if (!le.hasPotionEffect(PotionEffectType.INVISIBILITY)) {
if (!(le instanceof Slime) && !le.hasPotionEffect(PotionEffectType.INVISIBILITY)) {
((LivingEntity) entity).addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 20 * 60
* 60 * 24 * 7, 1));
}