mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-29 22:23:59 +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.Skeleton.SkeletonType;
|
||||||
import org.bukkit.entity.Villager.Profession;
|
import org.bukkit.entity.Villager.Profession;
|
||||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
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.Joiner;
|
||||||
import com.google.common.base.Splitter;
|
import com.google.common.base.Splitter;
|
||||||
@ -977,6 +979,7 @@ public class NPCCommands {
|
|||||||
Messaging.send(sender,
|
Messaging.send(sender,
|
||||||
String.format(format, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), loc.getWorld().getName()));
|
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>");
|
Messaging.send(sender, " <a>Traits<e>");
|
||||||
for (Trait trait : npc.getTraits()) {
|
for (Trait trait : npc.getTraits()) {
|
||||||
if (CitizensAPI.getTraitFactory().isInternalTrait(trait))
|
if (CitizensAPI.getTraitFactory().isInternalTrait(trait))
|
||||||
|
@ -278,6 +278,8 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
|||||||
super.m();
|
super.m();
|
||||||
if (npc == null)
|
if (npc == null)
|
||||||
return;
|
return;
|
||||||
|
updateEffects = true;
|
||||||
|
tickPotionEffects();
|
||||||
|
|
||||||
boolean navigating = npc.getNavigator().isNavigating();
|
boolean navigating = npc.getNavigator().isNavigating();
|
||||||
updatePackets(navigating);
|
updatePackets(navigating);
|
||||||
|
Loading…
Reference in New Issue
Block a user