SpilledBukkit

Full Version: Giving enchantment glow without attaching a name to it?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I Googled around Bukkit and Spigot with no luck with this. It seems that something within the API must have changed at some point.

How can you add an enchantment glow to an itemstack without explicitly giving it an enchantment type? What I mean is I know it can be done using an NBT tag, but that's reflection and I'm trying to avoid that if possible. Another way i've seen is creating a new enchantment implementing the bukkit enchantment interface and then attaching it to the item, but that doesn't seem to do anything.

Any ideas?
Have you debugged the Bukkit enchantment/wiresharked it to ensure that the correct slot data is being sent?
(04-16-2017, 09:55 PM)yPedx Wrote: [ -> ]This should help you a bit ;D
https://bukkit.org/threads/how-to-make-a...nt.374594/
Probably won't work. Seems a bit outdated Wink
(04-21-2017, 10:25 AM)Binner_Done Wrote: [ -> ]
(04-16-2017, 09:55 PM)yPedx Wrote: [ -> ]This should help you a bit ;D
https://bukkit.org/threads/how-to-make-a...nt.374594/
Probably won't work. Seems a bit outdated Wink

Custom enchantments work for my plugin (1.11.2), maybe you forgot to register the enchantment?
This does not require reflection:
Code:
       Enchantment.registerEnchantment(glow);
@MCMastery that does not work. It's exactly what I'm using with no effect.
I've used the method above successfully in (now deprecated and abandoned) ALib. I look back with horror at the source code, but it worked. Atleast it did about a year ago. https://github.com/ArsenArsen/ALib/blob/.../Glow.java
@ArsenArsen Odd. Well, when my finals end next week, I'll get a lot of time to dive back into this project and i'll give it a shot again with wireshark