Repository navigation
Add PlayerAdvancementCriterionRevokeEvent and PlayerAdvancementRevokeEvent - #14445
FlowerDevelops wants to merge 9 commits into
Conversation
ImKarven
left a comment
There was a problem hiding this comment.
PlayerAdvancementRevokeEvent should also have changes similar to PlayerAdvancementRevokeCriterionEvent.
Javadoc should be added to getAdvancement() (for both events) and getCriterion().
Actually, the firing logic for PlayerAdvancementRevokeCriterionEvent should be moved to PlayerAdvancements#revoke so that the event is also fired when a plugin revoke an advancement through the API.
|
I'll check all comment and change my code. |
|
I made 2 commits that should fix this |
|
If there are any changes you'd still want to see, tell me |
|
Should all be fixed and working! |
Your patch seem to be gone |
Hm? What patch is gone? |
|
That's weird, 1s |
|
Let me fix this, really weird |
|
I ran But for some reason it deleted the patch? |
|
Yeah okay, forgot to rebuild patches 😓 |
Doc94
left a comment
There was a problem hiding this comment.
Missing docs in methods for the new events
I dont know how to make docs |
|
My first PR as you've probably noticed |
|
Did some research and added Javadocs |
|
Okay im gonna check and maybe make a few changes. |
Based in the grant/done events
| + if (wasDone && !progress.isDone()) { | ||
| + // Paper start - Add PlayerAdvancementRevokeEvent | ||
| + final io.papermc.paper.event.player.PlayerAdvancementRevokeEvent event = new io.papermc.paper.event.player.PlayerAdvancementRevokeEvent(this.player.getBukkitEntity(), advancement.toBukkit()); | ||
| + if (!event.callEvent()) { | ||
| + progress.grantProgress(criterion); | ||
| + return false; | ||
| + } | ||
| + // Paper end - Add PlayerAdvancementRevokeEvent |
There was a problem hiding this comment.
Okay i check this... not sure about a good case for cancel (the Done event not has that because for this its better handle criterion rather than the whole "advancement)
and when test this event its not fired in the final of the criterion remove not sure if that is the correct behaviour....
No description provided.