@@ -0,0 +1,1881 @@
+package deterno.fight.tgm.damage.tracker;%0A%0Aimport com.google.common.base.Preconditions;%0Aimport deterno.fight.tgm.damage.tracker.plugin.DamageAPIHelper;%0Aimport org.bukkit.Bukkit;%0Aimport org.bukkit.entity.LivingEntity;%0Aimport org.bukkit.event.entity.EntityDamageEvent;%0Aimport org.bukkit.event.entity.EntityDamageEvent.DamageCause;%0A%0Aimport javax.annotation.Nonnull;%0A%0A/**%0A * Provides convenient static API calls for other plugins to use.%0A */%0Apublic final class DamageAPI %7B%0A    private DamageAPI() %7B %7D%0A%0A    /**%0A     * Inflicts the given damage on an entity.%0A     *%0A     * This method will call the appropriate damage method and fire an %7B@link EntityDamageEvent%7D.%0A     *%0A     * @param entity Entity to inflict damage upon%0A     * @param damage Amount of half-hearts of damage to inflict%0A     * @param info %7B@link DamageInfo%7D object that details the type of damage%0A     * @return the final %7B@link Damage%7D object (never null)%0A     *%0A     * @throws NullPointerException if entity or info is null%0A     * throws IllegalArgumentExcpetion if hearts is less than zero%0A     */%0A    public static @Nonnull%0A    Damage inflictDamage(@Nonnull LivingEntity entity, int damage, @Nonnull DamageInfo info) %7B%0A        Preconditions.checkNotNull(entity, %22living entity%22);%0A        Preconditions.checkArgument(damage %3E= 0, %22damage must be greater than or equal to zero%22);%0A        Preconditions.checkNotNull(info, %22damage info%22);%0A%0A        DamageAPIHelper helper = DamageAPIHelper.get();%0A%0A        EntityDamageEvent event = new EntityDamageEvent(entity, DamageCause.CUSTOM, damage);%0A        helper.setEventDamageInfo(event, info);%0A%0A        Bukkit.getPluginManager().callEvent(event);%0A%0A        if(event.isCancelled()) %7B%0A            return null;%0A        %7D%0A%0A        entity.damage(event.getDamage());%0A%0A        helper.setEventDamageInfo(event, null);%0A%0A        return helper.getOurEvent(event).toDamageObject();%0A    %7D%0A%7D%0A

Create DamageAPI.java