I did manage to get it to find the armorType value, still don't know about the event.
package com.twreck.stride;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnumEnchantmentType;
import net.minecraft.init.Items;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class EnchantmentStride extends Enchantment {
public EnchantmentStride(int id, int rarity) {
super(id, rarity, EnumEnchantmentType.armor_feet);
this.setName("Stride");
}
public int getMinEnchantability(int par1) {
return 5 + (par1 - 1) * 10;
}
public int getMaxEnchantability(int par1) {
return this.getMinEnchantability(par1) + 20;
}
public int getMaxLevel() {
return 3;
}
@Override
public boolean canApply(ItemStack stack){
return stack.getItem() instanceof ItemArmor && ((ItemArmor)stack.getItem()).armorType == 3 ? true : super.canApply(stack);
}
}