// 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/base/SimpleFallDamageInfo.java
// public class SimpleFallDamageInfo extends AbstractDamageInfo implements FallDamageInfo {
//     public SimpleFallDamageInfo(@Nullable LivingEntity resolvedDamager, float fallDistance) {
//         super(resolvedDamager);
// 
//         Preconditions.checkArgument(fallDistance >= 0, "fall distance must be >= 0");
// 
//         this.fallDistance = fallDistance;
//     }
// 
//     public float getFallDistance() {
//         return this.fallDistance;
//     }
// 
//     private final float fallDistance;
// }


import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import tc.oc.tracker.DamageInfo;
import tc.oc.tracker.DamageResolver;
import tc.oc.tracker.Lifetime;
import tc.oc.tracker.damage.base.SimpleFallDamageInfo;
package tc.oc.tracker.damage.resolvers;




public class FallDamageResolver implements DamageResolver {
    public @Nullable DamageInfo resolve(@Nonnull LivingEntity entity, @Nonnull Lifetime lifetime, @Nonnull EntityDamageEvent damageEvent) {
        if(damageEvent.getCause() == DamageCause.FALL) {
            float fallDistance = Math.max(0, entity.getFallDistance());

// 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/base/SimpleFallDamageInfo.java
// public class SimpleFallDamageInfo extends AbstractDamageInfo implements FallDamageInfo {
//     public SimpleFallDamageInfo(@Nullable LivingEntity resolvedDamager, float fallDistance) {
//         super(resolvedDamager);
// 
//         Preconditions.checkArgument(fallDistance >= 0, "fall distance must be >= 0");
// 
//         this.fallDistance = fallDistance;
//     }
// 
//     public float getFallDistance() {
//         return this.fallDistance;
//     }
// 
//     private final float fallDistance;
// }


// Path: src/main/java/tc/oc/tracker/damage/resolvers/FallDamageResolver.java
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
import tc.oc.tracker.DamageInfo;
import tc.oc.tracker.DamageResolver;
import tc.oc.tracker.Lifetime;
import tc.oc.tracker.damage.base.SimpleFallDamageInfo;

package tc.oc.tracker.damage.resolvers;




public class FallDamageResolver implements DamageResolver {
    public @Nullable DamageInfo resolve(@Nonnull LivingEntity entity, @Nonnull Lifetime lifetime, @Nonnull EntityDamageEvent damageEvent) {
        if(damageEvent.getCause() == DamageCause.FALL) {
            float fallDistance = Math.max(0, entity.getFallDistance());

            return new SimpleFallDamageInfo(null, fallDistance);