sotid Posted April 29, 2018 Posted April 29, 2018 (edited) if(blessedScroll){ item.setEnchantLevel(Config.BREAK_ENCHANT); item.updateDatabase(); }else if(crystalScroll){ item.setEnchantLevel(Config.CRYSTAL_ENCHANT_MIN); item.updateDatabase(); So I found some topics about custom enchant system but not what I want to do. I want the bless /crystals when the enchant fails , the item's enchantment to not change. If I enchant a +16 bow and fails then it stays +16. Edited April 29, 2018 by sotid
0 SweeTs Posted April 29, 2018 Posted April 29, 2018 item.setEnchantLevel(item.getEnchantLevel()) or simply do nothing inside brackets, no code, no actions.
0 sotid Posted April 30, 2018 Author Posted April 30, 2018 (edited) if(blessedScroll){ item.setEnchantLevel(item.getEnchantLevel()); item.updateDatabase(); }else if(crystalScroll){ item.setEnchantLevel(item.getEnchantLevel()); item.updateDatabase(); Thanks SweeTs once again, works perfectly :) You can lock it. Edited April 30, 2018 by sotid
Question
sotid
if(blessedScroll){ item.setEnchantLevel(Config.BREAK_ENCHANT); item.updateDatabase(); }else if(crystalScroll){ item.setEnchantLevel(Config.CRYSTAL_ENCHANT_MIN); item.updateDatabase();
So I found some topics about custom enchant system but not what I want to do.
I want the bless /crystals when the enchant fails , the item's enchantment to not change.
If I enchant a +16 bow and fails then it stays +16.
Edited by sotid2 answers to this question
Recommended Posts