Question 1.20.6 Update

Jan

New member
Apr 15, 2024
5
0
1
Hello Everyone currently I am working on updateing my Plugins to 1.20.6 and it is a realy big pain.

There are serveral changes that need to be covered...
First of all there are multiple Enchantments that are removed/renamed. This is easy to fix but realy annoying.

An other point reguarding to enchantments is not so easy to fix. In one of my Plugins there is an enchant command, that player could enchant Items with a command.
But there is a problem. The Method "Enchantment.getItemTarget()" is deprecated and marked for removal. I know this method would work until the next version releases but
when I could remove this rightknow the plugin will work in the future without maintanence.

The anotation inside the Javadoc is the following (https://jd.papermc.io/paper/1.20.6/org/bukkit/enchantments/Enchantment.html):
Deprecated, for removal: This API element is subject to removal in a future version.
enchantment groupings are now managed by tags, not categories

The sames goes For the LivingEntity there is the method "LivingEntity.getCategory()" with the same annotation. And I dont know how to access the category right know or how to access the Target rightknow maybe someone of you had the same Problem like me and can help me with this issue
 
Version Output
1.20.6

electronicboy

Administrator
Staff member
Dec 11, 2021
241
13
42
28
Both of those concepts no longer exist, and so you're generally going to need to find a better way of identifying what you're after, or you'll have to maintain your own set of groupings, etc