I need some help with my plugin


im trying to make some stuff with Attrubutes but im having a hard time
this is what i have so far
hello ive been developing plugins for a while and im starting to learn lms again and im trying to use Attributes but im so lost this is what i have currently

public ItemStack Armor(Material material,EquipmentSlot equipmentSlot){
ItemStack itemStack = new ItemStack(material);
ItemMeta meta = itemStack.getItemMeta();
meta.addEnchant(Enchantment.LUCK, 1, true);

net.minecraft.server.v1_12_R1.AttributeModifier attributeModifier = I

AttributeInstance modifier = (AttributeInstance) new AttributeModifier(“GENERIC_ARMOR”,2, AttributeModifier.Operation.ADD_NUMBER);
AttributeModifier modifier2 = new AttributeModifier(“GENERIC_ARMOR”,2, AttributeModifier.Operation.ADD_NUMBER);

for(AttributeModifier modifiers : modifier.getModifiers()) {
if(modifiers.getUniqueId().equals(modifier2.getUniqueId())) {

return itemStack;

i legit have no i dea if this is right i tried looking at other peoples stuff but i think that was an old version