// Path: src/main/java/tc/oc/tracker/Damage.java
// public interface Damage {
//     /**
//      * Gets the amount of damage that was inflicted.
//      *
//      * Note that this is the raw damage in half-hearts before dampeners (armor,
//      * potion effects) are applied.
//      *
//      * Contract specifies that the result is 0 or greater.
//      *
//      * @return Amount of damage inflicted
//      */
//     int getDamage();
// 
//     /**
//      * Gets the location where the damage occurred.
//      *
//      * Contract specifies that the result is never null.
//      *
//      * @return Location of damage
//      */
//     @Nonnull Location getLocation();
// 
//     /**
//      * Gets the time that the damage occurred.
//      *
//      * Contract specifies that the result is never null.
//      *
//      * @return Time of damage
//      */
//     @Nonnull Instant getTime();
// 
//     /**
//      * Gets additional information regarding this damage.
//      *
//      * @return {@link DamageInfo} subclass describing the damage in more detail
//      */
//     @Nonnull DamageInfo getInfo();
// }
// 
// 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/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/base/SimpleDamage.java
// public class SimpleDamage implements Damage {
//     public SimpleDamage(int damage, @Nonnull Location location, @Nonnull Instant time, @Nonnull DamageInfo info) {
//         Preconditions.checkArgument(damage >= 0, "damage must be greater than or equal to zero");
//         Preconditions.checkNotNull(location, "location");
//         Preconditions.checkNotNull(time, "time");
//         Preconditions.checkNotNull(info, "info");
// 
//         this.damage = damage;
//         this.location = location;
//         this.time = time;
//         this.info = info;
//     }
// 
//     public int getDamage() {
//         return this.damage;
//     }
// 
//     public @Nonnull Location getLocation() {
//         return this.location;
//     }
// 
//     public @Nonnull Instant getTime() {
//         return this.time;
//     }
// 
//     public @Nonnull DamageInfo getInfo() {
//         return this.info;
//     }
// 
//     private final int damage;
//     private final @Nonnull Location location;
//     private final @Nonnull Instant time;
//     private final @Nonnull DamageInfo info;
// }


import javax.annotation.Nonnull;
import org.bukkit.Location;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.joda.time.Instant;
import tc.oc.tracker.Damage;
import tc.oc.tracker.DamageInfo;
import tc.oc.tracker.Lifetime;
import tc.oc.tracker.base.SimpleDamage;
import com.google.common.base.Preconditions;
package tc.oc.tracker.event;





/**
 * Called when an entity undergoes some type of damage.
 */
public class EntityDamageEvent extends Event implements Cancellable {
    private final @Nonnull LivingEntity entity;
    private final @Nonnull Lifetime lifetime;
    private int damage;
    private final @Nonnull Location location;
    private final @Nonnull Instant time;
// Path: src/main/java/tc/oc/tracker/Damage.java
// public interface Damage {
//     /**
//      * Gets the amount of damage that was inflicted.
//      *
//      * Note that this is the raw damage in half-hearts before dampeners (armor,
//      * potion effects) are applied.
//      *
//      * Contract specifies that the result is 0 or greater.
//      *
//      * @return Amount of damage inflicted
//      */
//     int getDamage();
// 
//     /**
//      * Gets the location where the damage occurred.
//      *
//      * Contract specifies that the result is never null.
//      *
//      * @return Location of damage
//      */
//     @Nonnull Location getLocation();
// 
//     /**
//      * Gets the time that the damage occurred.
//      *
//      * Contract specifies that the result is never null.
//      *
//      * @return Time of damage
//      */
//     @Nonnull Instant getTime();
// 
//     /**
//      * Gets additional information regarding this damage.
//      *
//      * @return {@link DamageInfo} subclass describing the damage in more detail
//      */
//     @Nonnull DamageInfo getInfo();
// }
// 
// 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/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/base/SimpleDamage.java
// public class SimpleDamage implements Damage {
//     public SimpleDamage(int damage, @Nonnull Location location, @Nonnull Instant time, @Nonnull DamageInfo info) {
//         Preconditions.checkArgument(damage >= 0, "damage must be greater than or equal to zero");
//         Preconditions.checkNotNull(location, "location");
//         Preconditions.checkNotNull(time, "time");
//         Preconditions.checkNotNull(info, "info");
// 
//         this.damage = damage;
//         this.location = location;
//         this.time = time;
//         this.info = info;
//     }
// 
//     public int getDamage() {
//         return this.damage;
//     }
// 
//     public @Nonnull Location getLocation() {
//         return this.location;
//     }
// 
//     public @Nonnull Instant getTime() {
//         return this.time;
//     }
// 
//     public @Nonnull DamageInfo getInfo() {
//         return this.info;
//     }
// 
//     private final int damage;
//     private final @Nonnull Location location;
//     private final @Nonnull Instant time;
//     private final @Nonnull DamageInfo info;
// }


// Path: src/main/java/tc/oc/tracker/event/EntityDamageEvent.java
import javax.annotation.Nonnull;
import org.bukkit.Location;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.joda.time.Instant;
import tc.oc.tracker.Damage;
import tc.oc.tracker.DamageInfo;
import tc.oc.tracker.Lifetime;
import tc.oc.tracker.base.SimpleDamage;
import com.google.common.base.Preconditions;

package tc.oc.tracker.event;





/**
 * Called when an entity undergoes some type of damage.
 */
public class EntityDamageEvent extends Event implements Cancellable {
    private final @Nonnull LivingEntity entity;
    private final @Nonnull Lifetime lifetime;
    private int damage;
    private final @Nonnull Location location;
    private final @Nonnull Instant time;
    private final @Nonnull DamageInfo info;