diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/entity/properties/EntitySittingProperty.java b/plugin/src/main/java/lol/pyr/znpcsplus/entity/properties/EntitySittingProperty.java index e9b66c5..5e59221 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/entity/properties/EntitySittingProperty.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/entity/properties/EntitySittingProperty.java @@ -24,10 +24,12 @@ public class EntitySittingProperty extends EntityPropertyImpl<Boolean> { @Override public void apply(Player player, PacketEntity entity, boolean isSpawned, Map<Integer, EntityData> properties) { boolean sitting = entity.getProperty(this); - if (sitting) if (entity.getVehicle() == null) { - PacketEntity vehiclePacketEntity = new PacketEntity(packetFactory, new ArmorStandVehicleProperties(propertyRegistry), - entity.getViewable(), EntityTypes.ARMOR_STAND, entity.getLocation().withY(entity.getLocation().getY() - 0.9)); - entity.setVehicle(vehiclePacketEntity); + if (sitting) { + if (entity.getVehicle() == null) { + PacketEntity vehiclePacketEntity = new PacketEntity(packetFactory, new ArmorStandVehicleProperties(propertyRegistry), + entity.getViewable(), EntityTypes.ARMOR_STAND, entity.getLocation().withY(entity.getLocation().getY() - 0.9)); + entity.setVehicle(vehiclePacketEntity); + } } else if (entity.getVehicle() != null) { entity.setVehicle(null); }