Open Fusezion opened 5 months ago
We don't think this is currently possible to implement. To start, it is not clear when onRevoke
should be called:
onGrant
method has already been called (due to unredeemed advancements onGrant
might not be called immediately at the time the advancement was completed);onGrant
method has already been called.Note that the
revoke(player)
method is just a shortcut forsetProgression(player, 0, false)
.
Every of the four options previously mentioned has its own challenges:
onRevoke
might get called before onGrant
(due to unredeemed advancements) and implementations of onRevoke
should deal with it;onGrant
has already been executed in the db, which poses issues regarding synchronization;
I'll try to make this as clear as I can. Add an
onRevoke
method that is called when you use any of theAdvancement#revoke()
methods. Currently there'sonGrant
but no way to revert what it does when `revoke is called. This prevents servers from more accurately handling specific cases for grant.