Search in sources :

Example 1 with TypeEnchantment

use of com.massivecraft.massivecore.command.type.TypeEnchantment in project MassiveCore by MassiveCraft.

the class TestTypeEnchantment method test.

// -------------------------------------------- //
// TEST
// -------------------------------------------- //
@Override
public void test() {
    final List<Enchantment> enchantments = new MassiveList<>(Arrays.asList(Enchantment.values()));
    for (Iterator<Enchantment> iterator = enchantments.iterator(); iterator.hasNext(); ) {
        Enchantment enchantment = iterator.next();
        if (TypeEnchantment.ID_TO_RAWNAMES.containsKey(enchantment.getId())) {
            iterator.remove();
        }
    }
    for (Enchantment enchantment : enchantments) {
        String issue = Txt.parse("<i>The enchantment <h>%s (%d)<i> lacks nicename in TypeEnchantment.", enchantment.getName(), enchantment.getId());
        this.addIssue(issue);
    }
}
Also used : MassiveList(com.massivecraft.massivecore.collections.MassiveList) TypeEnchantment(com.massivecraft.massivecore.command.type.TypeEnchantment) Enchantment(org.bukkit.enchantments.Enchantment)

Aggregations

MassiveList (com.massivecraft.massivecore.collections.MassiveList)1 TypeEnchantment (com.massivecraft.massivecore.command.type.TypeEnchantment)1 Enchantment (org.bukkit.enchantments.Enchantment)1