Skip to content

Commit

Permalink
Player skin changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Apr 5, 2014
1 parent 71eb3c6 commit df48d5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/net/citizensnpcs/trait/Controllable.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ public void onSpawn() {

@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());
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/citizensnpcs/trait/PlayerSkin.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void run() {
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));
}
Expand Down

0 comments on commit df48d5f

Please sign in to comment.