mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-12-28 20:17:50 +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
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!enabled || !npc.isSpawned() || getHandle().passenger == null)
|
if (!enabled || !npc.isSpawned() || getHandle().passenger == null
|
||||||
|
|| !(getHandle().passenger.getBukkitEntity() instanceof Player))
|
||||||
return;
|
return;
|
||||||
controller.run((Player) getHandle().passenger.getBukkitEntity());
|
controller.run((Player) getHandle().passenger.getBukkitEntity());
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ public class PlayerSkin extends Trait {
|
|||||||
if (entity instanceof LivingEntity) {
|
if (entity instanceof LivingEntity) {
|
||||||
LivingEntity le = (LivingEntity) entity;
|
LivingEntity le = (LivingEntity) entity;
|
||||||
le.setRemainingAir(20);
|
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
|
((LivingEntity) entity).addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 20 * 60
|
||||||
* 60 * 24 * 7, 1));
|
* 60 * 24 * 7, 1));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user