// 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/OwnedMobDamageInfo.java
// public class OwnedMobDamageInfo extends AbstractDamageInfo {
//     public OwnedMobDamageInfo(@Nullable LivingEntity resolvedDamager, @Nullable Player mobOwner, @Nullable Projectile projectile) {
//         super(resolvedDamager);
// 
//         this.mobOwner = mobOwner;
//         this.projectile = projectile;
//     }
// 
//     public @Nullable Player getMobOwner() {
//         return this.mobOwner;
//     }
// 
//     public @Nullable Projectile getProjectile() {
//         return this.projectile;
//     }
// 
//     protected final @Nullable Player mobOwner;
//     protected final @Nullable Projectile projectile;
// 
//     @Override
//     public @Nonnull String toString() {
//         return "OwnedMobDamageInfo{damager=" + this.resolvedDamager + ",mobOwner=" + this.mobOwner + ",projectile=" + this.projectile + "}";
//     }
// }
// 
// Path: src/main/java/tc/oc/tracker/trackers/OwnedMobTracker.java
// public interface OwnedMobTracker extends Tracker {
//     boolean hasOwner(@Nonnull LivingEntity entity);
// 
//     @Nullable Player getOwner(@Nonnull LivingEntity entity);
// 
//     @Nullable Player setOwner(@Nonnull LivingEntity entity, @Nullable Player player);
// }


import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
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.OwnedMobDamageInfo;
import tc.oc.tracker.trackers.OwnedMobTracker;
package tc.oc.tracker.damage.resolvers;




public class OwnedMobDamageResolver implements DamageResolver {
    private final OwnedMobTracker ownedMobTracker;

// 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/OwnedMobDamageInfo.java
// public class OwnedMobDamageInfo extends AbstractDamageInfo {
//     public OwnedMobDamageInfo(@Nullable LivingEntity resolvedDamager, @Nullable Player mobOwner, @Nullable Projectile projectile) {
//         super(resolvedDamager);
// 
//         this.mobOwner = mobOwner;
//         this.projectile = projectile;
//     }
// 
//     public @Nullable Player getMobOwner() {
//         return this.mobOwner;
//     }
// 
//     public @Nullable Projectile getProjectile() {
//         return this.projectile;
//     }
// 
//     protected final @Nullable Player mobOwner;
//     protected final @Nullable Projectile projectile;
// 
//     @Override
//     public @Nonnull String toString() {
//         return "OwnedMobDamageInfo{damager=" + this.resolvedDamager + ",mobOwner=" + this.mobOwner + ",projectile=" + this.projectile + "}";
//     }
// }
// 
// Path: src/main/java/tc/oc/tracker/trackers/OwnedMobTracker.java
// public interface OwnedMobTracker extends Tracker {
//     boolean hasOwner(@Nonnull LivingEntity entity);
// 
//     @Nullable Player getOwner(@Nonnull LivingEntity entity);
// 
//     @Nullable Player setOwner(@Nonnull LivingEntity entity, @Nullable Player player);
// }


// Path: src/main/java/tc/oc/tracker/damage/resolvers/OwnedMobDamageResolver.java
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
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.OwnedMobDamageInfo;
import tc.oc.tracker.trackers.OwnedMobTracker;

package tc.oc.tracker.damage.resolvers;




public class OwnedMobDamageResolver implements DamageResolver {
    private final OwnedMobTracker ownedMobTracker;

    public OwnedMobDamageResolver(OwnedMobTracker ownedMobTracker) {