exp_change event is not fired on getting advancement
LadyCailinBot opened this issue · 2 comments
Comment by PseudoKnight
The new advancements are weakly handled in Bukkit right now, so this doesn't surprise me. This is likely out of our control, even if I was to attempt to write a special workaround. I'll take a look at the code and if appropriate I'll create a ticket on the Spigot tracker.
Comment by PseudoKnight
So Bukkit docs say "Called when a players experience changes naturally" so it's possible it was never intended to be used for other methods of gaining exp. I think the bigger issue here is that AdvancementDoneEvent is not cancellable, so we can't stop the advancement or the experience the player gets. For my server I've had to write a plugin to reverse any advancements you get in a separate world from our survival worlds. I have to disable advancement announcements for that world and it still doesn't solve the exp thing. I suppose I could remove the exp afterwards.
I think the only thing you can do right now is do what I did with a custom plugin or modify the advancement to not give exp, though I haven't tried that before.