mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-27 19:47:51 +01:00
Player skin changes
This commit is contained in:
parent
54bd62c414
commit
99862ecf06
@ -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());
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user