// Path: src/main/java/tc/oc/tracker/DamageInfo.java
// public interface DamageInfo {
//     /**
//      * Gets the living entity most responsible for this damage.
//      *
//      * @return Resolved damager or null if none exists
//      */
//     @Nullable LivingEntity getResolvedDamager();
// }
// 
// Path: src/main/java/tc/oc/tracker/DamageResolver.java
// public interface DamageResolver {
//     @Nullable DamageInfo resolve(@Nonnull LivingEntity entity, @Nonnull Lifetime lifetime, @Nonnull EntityDamageEvent damageEvent);
// }
// 
// Path: src/main/java/tc/oc/tracker/Lifetime.java
// public interface Lifetime {
//     @Nullable Instant getStart();
// 
//     void setStart(@Nonnull Instant start);
// 
//     @Nullable Instant getEnd();
// 
//     void setEnd(@Nonnull Instant end);
// 
//     @Nonnull List<Damage> getDamage();
// 
//     @Nonnull ListIterator<Damage> getDamageFirst();
// 
//     @Nonnull ListIterator<Damage> getDamageLast();
// 
//     @Nullable Damage getFirstDamage();
// 
//     @Nullable Damage getLastDamage();
// 
//     /**
//      * Gets the last damage instance where the info object is an instance of
//      * the specified class. Uses {@link Class#isInstance(Object)} to check info
//      * objects.
//      *
//      * @param damageInfoClass DamageInfo class to check for
//      * @return Last damage that matched or null if none matched
//      *
//      * @throws NullPointerException if damageInfoClass is null
//      */
//     @Nullable Damage getLastDamage(@Nonnull Class<? extends DamageInfo> damageInfoClass);
// 
//     void addDamage(@Nonnull Damage damage);
// }
// 
// Path: src/main/java/tc/oc/tracker/damage/ProjectileDamageInfo.java
// public class ProjectileDamageInfo extends AbstractDamageInfo {
//     public ProjectileDamageInfo(@Nonnull Projectile projectile, @Nullable LivingEntity resolvedDamager, @Nullable Double projectileDistance) {
//         super(resolvedDamager);
// 
//         Preconditions.checkNotNull(projectile, "projectile");
// 
//         this.projectile = projectile;
//         this.projectileDistance = projectileDistance;
//     }
// 
//     public @Nonnull Projectile getProjectile() {
//         return this.projectile;
//     }
// 
//     public @Nullable Double getDistance() {
//         return this.projectileDistance;
//     }
// 
//     protected final @Nonnull Projectile projectile;
//     protected final @Nullable Double projectileDistance;
// 
//     @Override
//     public @Nonnull String toString() {
//         return "ProjectileDamageInfo{shooter=" + this.resolvedDamager + ",projectile=" + this.projectile + ",distance=" + this.projectileDistance + "}";
//     }
// }
// 
// Path: src/main/java/tc/oc/tracker/trackers/ProjectileDistanceTracker.java
// public interface ProjectileDistanceTracker extends Tracker {
//     boolean hasLaunchLocation(@Nonnull Projectile entity);
// 
//     @Nullable Location getLaunchLocation(@Nonnull Projectile projectile);
// 
//     @Nullable Location setLaunchLocation(@Nonnull Projectile projectile, @Nullable Location location);
// }


import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.bukkit.Location;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Projectile;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import tc.oc.tracker.DamageInfo;
import tc.oc.tracker.DamageResolver;
import tc.oc.tracker.Lifetime;
import tc.oc.tracker.damage.ProjectileDamageInfo;
import tc.oc.tracker.trackers.ProjectileDistanceTracker;
package tc.oc.tracker.damage.resolvers;




public class ProjectileDamageResolver implements DamageResolver {
    private final ProjectileDistanceTracker projectileDistanceTracker;

    public ProjectileDamageResolver(ProjectileDistanceTracker projectileDistanceTracker) {
        this.projectileDistanceTracker = projectileDistanceTracker;
    }

// Path: src/main/java/tc/oc/tracker/DamageInfo.java
// public interface DamageInfo {
//     /**
//      * Gets the living entity most responsible for this damage.
//      *
//      * @return Resolved damager or null if none exists
//      */
//     @Nullable LivingEntity getResolvedDamager();
// }
// 
// Path: src/main/java/tc/oc/tracker/DamageResolver.java
// public interface DamageResolver {
//     @Nullable DamageInfo resolve(@Nonnull LivingEntity entity, @Nonnull Lifetime lifetime, @Nonnull EntityDamageEvent damageEvent);
// }
// 
// Path: src/main/java/tc/oc/tracker/Lifetime.java
// public interface Lifetime {
//     @Nullable Instant getStart();
// 
//     void setStart(@Nonnull Instant start);
// 
//     @Nullable Instant getEnd();
// 
//     void setEnd(@Nonnull Instant end);
// 
//     @Nonnull List<Damage> getDamage();
// 
//     @Nonnull ListIterator<Damage> getDamageFirst();
// 
//     @Nonnull ListIterator<Damage> getDamageLast();
// 
//     @Nullable Damage getFirstDamage();
// 
//     @Nullable Damage getLastDamage();
// 
//     /**
//      * Gets the last damage instance where the info object is an instance of
//      * the specified class. Uses {@link Class#isInstance(Object)} to check info
//      * objects.
//      *
//      * @param damageInfoClass DamageInfo class to check for
//      * @return Last damage that matched or null if none matched
//      *
//      * @throws NullPointerException if damageInfoClass is null
//      */
//     @Nullable Damage getLastDamage(@Nonnull Class<? extends DamageInfo> damageInfoClass);
// 
//     void addDamage(@Nonnull Damage damage);
// }
// 
// Path: src/main/java/tc/oc/tracker/damage/ProjectileDamageInfo.java
// public class ProjectileDamageInfo extends AbstractDamageInfo {
//     public ProjectileDamageInfo(@Nonnull Projectile projectile, @Nullable LivingEntity resolvedDamager, @Nullable Double projectileDistance) {
//         super(resolvedDamager);
// 
//         Preconditions.checkNotNull(projectile, "projectile");
// 
//         this.projectile = projectile;
//         this.projectileDistance = projectileDistance;
//     }
// 
//     public @Nonnull Projectile getProjectile() {
//         return this.projectile;
//     }
// 
//     public @Nullable Double getDistance() {
//         return this.projectileDistance;
//     }
// 
//     protected final @Nonnull Projectile projectile;
//     protected final @Nullable Double projectileDistance;
// 
//     @Override
//     public @Nonnull String toString() {
//         return "ProjectileDamageInfo{shooter=" + this.resolvedDamager + ",projectile=" + this.projectile + ",distance=" + this.projectileDistance + "}";
//     }
// }
// 
// Path: src/main/java/tc/oc/tracker/trackers/ProjectileDistanceTracker.java
// public interface ProjectileDistanceTracker extends Tracker {
//     boolean hasLaunchLocation(@Nonnull Projectile entity);
// 
//     @Nullable Location getLaunchLocation(@Nonnull Projectile projectile);
// 
//     @Nullable Location setLaunchLocation(@Nonnull Projectile projectile, @Nullable Location location);
// }


// Path: src/main/java/tc/oc/tracker/damage/resolvers/ProjectileDamageResolver.java
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.bukkit.Location;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Projectile;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import tc.oc.tracker.DamageInfo;
import tc.oc.tracker.DamageResolver;
import tc.oc.tracker.Lifetime;
import tc.oc.tracker.damage.ProjectileDamageInfo;
import tc.oc.tracker.trackers.ProjectileDistanceTracker;

package tc.oc.tracker.damage.resolvers;




public class ProjectileDamageResolver implements DamageResolver {
    private final ProjectileDistanceTracker projectileDistanceTracker;

    public ProjectileDamageResolver(ProjectileDistanceTracker projectileDistanceTracker) {
        this.projectileDistanceTracker = projectileDistanceTracker;
    }

    public @Nullable DamageInfo resolve(@Nonnull LivingEntity entity, @Nonnull Lifetime lifetime, @Nonnull EntityDamageEvent damageEvent) {