Skip to content

Commit

Permalink
Fix Revoke-Methods granting the Advancement instead of revoking it
Browse files Browse the repository at this point in the history
  • Loading branch information
ZockerAxel committed Dec 26, 2021
1 parent 89df334 commit f8a7af2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ public GenericResult grantAdvancement(UUID uuid, Advancement advancement) {
*/
public GenericResult revokeAdvancement(Player player, Advancement advancement) {
AdvancementProgress progress = advancement.getProgress(player);
GenericResult result = progress.grant();
GenericResult result = progress.revoke();

if(result == GenericResult.CHANGED) {
updateProgress(player, advancement);
Expand All @@ -502,7 +502,7 @@ public GenericResult revokeAdvancement(UUID uuid, Advancement advancement) {
return revokeAdvancement(Bukkit.getPlayer(uuid), advancement);
} else {
AdvancementProgress progress = advancement.getProgress(uuid);
GenericResult result = progress.grant();
GenericResult result = progress.revoke();
return result;
}
}
Expand Down Expand Up @@ -830,7 +830,6 @@ public void loadProgress(UUID uuid, SaveFile saveFile, Advancement... advancemen
}
}


/**
* Unloads progress for Advancements in this Manager
*
Expand Down

0 comments on commit f8a7af2

Please sign in to comment.