mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 18:45:29 +01:00
Fix potion effects on players
This commit is contained in:
parent
5d060e73ee
commit
0b8f754197
@ -32,6 +32,8 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Skeleton.SkeletonType;
|
||||
import org.bukkit.entity.Villager.Profession;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Splitter;
|
||||
@ -977,6 +979,7 @@ public class NPCCommands {
|
||||
Messaging.send(sender,
|
||||
String.format(format, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), loc.getWorld().getName()));
|
||||
}
|
||||
((LivingEntity) npc.getEntity()).addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 1, 10));
|
||||
Messaging.send(sender, " <a>Traits<e>");
|
||||
for (Trait trait : npc.getTraits()) {
|
||||
if (CitizensAPI.getTraitFactory().isInternalTrait(trait))
|
||||
|
@ -278,6 +278,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
super.m();
|
||||
if (npc == null)
|
||||
return;
|
||||
updateEffects = true;
|
||||
tickPotionEffects();
|
||||
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
updatePackets(navigating);
|
||||
|
Loading…
Reference in New Issue
Block a user