mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-10-04 10:27:26 +02:00
Fix /npc gravity for players
This commit is contained in:
parent
495e8ad286
commit
726cf9b54a
@ -287,7 +287,7 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder, Skinnable
|
||||
|
||||
boolean navigating = npc.getNavigator().isNavigating();
|
||||
updatePackets(navigating);
|
||||
if (npc.getTrait(Gravity.class).hasGravity() && !navigating && getBukkitEntity() != null
|
||||
if (!navigating && getBukkitEntity() != null && npc.getTrait(Gravity.class).hasGravity()
|
||||
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) {
|
||||
g(0, 0);
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package net.citizensnpcs.trait;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import net.citizensnpcs.api.persistence.Persist;
|
||||
@ -28,9 +27,6 @@ public class Gravity extends Trait implements Toggleable {
|
||||
public void run() {
|
||||
if (!npc.isSpawned())
|
||||
return;
|
||||
if (npc.getEntity() instanceof Player) {
|
||||
return;
|
||||
}
|
||||
if (!enabled || npc.getNavigator().isNavigating())
|
||||
return;
|
||||
Vector vector = npc.getEntity().getVelocity();
|
||||
|
Loading…
Reference in New Issue
Block a user