// Path: src/main/java/org/cyclops/everlastingabilities/api/Ability.java
// public class Ability implements Comparable<Ability> {
// 
//     public static final Ability EMPTY = new Ability(new AbilityType("", "", () -> Rarity.COMMON, () -> 0, () -> 0, () -> true, () -> true, () -> true, () -> true), 0);
// 
//     private final IAbilityType abilityType;
//     private final int level;
// 
//     public Ability(@Nonnull IAbilityType abilityType, int level) {
//         this.abilityType = Objects.requireNonNull(abilityType);
//         this.level = level;
//     }
// 
//     public IAbilityType getAbilityType() {
//         return abilityType;
//     }
// 
//     public int getLevel() {
//         return level;
//     }
// 
//     @Override
//     public String toString() {
//         return String.format("[%s @ %s]", abilityType.getTranslationKey(), level);
//     }
// 
//     @Override
//     public int compareTo(Ability other) {
//         return this.toString().compareTo(other.toString());
//     }
// 
//     public ITextComponent getTextComponent() {
//         return new StringTextComponent("[")
//                 .append(new TranslationTextComponent(abilityType.getTranslationKey()))
//                 .appendString(" @ " + level + "]");
//     }
// 
//     public boolean isEmpty() {
//         return getLevel() <= 0;
//     }
// 
// }


import lombok.NonNull;
import org.cyclops.everlastingabilities.api.Ability;
package org.cyclops.everlastingabilities.api.capability;


/**
 * Extension of the {@link IAbilityStore} that allows insertion and deletion of abilities.
 * @author rubensworks
 */
public interface IMutableAbilityStore extends IAbilityStore {

    /**
     * Add the given ability.
     * @param ability The ability.
     * @param doAdd If the addition should actually be done.
     * @return The ability part that was added.
     */
    @NonNull
// Path: src/main/java/org/cyclops/everlastingabilities/api/Ability.java
// public class Ability implements Comparable<Ability> {
// 
//     public static final Ability EMPTY = new Ability(new AbilityType("", "", () -> Rarity.COMMON, () -> 0, () -> 0, () -> true, () -> true, () -> true, () -> true), 0);
// 
//     private final IAbilityType abilityType;
//     private final int level;
// 
//     public Ability(@Nonnull IAbilityType abilityType, int level) {
//         this.abilityType = Objects.requireNonNull(abilityType);
//         this.level = level;
//     }
// 
//     public IAbilityType getAbilityType() {
//         return abilityType;
//     }
// 
//     public int getLevel() {
//         return level;
//     }
// 
//     @Override
//     public String toString() {
//         return String.format("[%s @ %s]", abilityType.getTranslationKey(), level);
//     }
// 
//     @Override
//     public int compareTo(Ability other) {
//         return this.toString().compareTo(other.toString());
//     }
// 
//     public ITextComponent getTextComponent() {
//         return new StringTextComponent("[")
//                 .append(new TranslationTextComponent(abilityType.getTranslationKey()))
//                 .appendString(" @ " + level + "]");
//     }
// 
//     public boolean isEmpty() {
//         return getLevel() <= 0;
//     }
// 
// }


// Path: src/main/java/org/cyclops/everlastingabilities/api/capability/IMutableAbilityStore.java
import lombok.NonNull;
import org.cyclops.everlastingabilities.api.Ability;

package org.cyclops.everlastingabilities.api.capability;


/**
 * Extension of the {@link IAbilityStore} that allows insertion and deletion of abilities.
 * @author rubensworks
 */
public interface IMutableAbilityStore extends IAbilityStore {

    /**
     * Add the given ability.
     * @param ability The ability.
     * @param doAdd If the addition should actually be done.
     * @return The ability part that was added.
     */
    @NonNull
    public Ability addAbility(Ability ability, boolean doAdd);