aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/og/net/minecraft/server/AdvancementDataPlayer.patch
blob: 87812ef5790dd12475fc345ec77545c67896a3e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- a/net/minecraft/server/AdvancementDataPlayer.java
+++ b/net/minecraft/server/AdvancementDataPlayer.java
@@ -196,6 +196,7 @@
             AdvancementHolder advancementholder = advancementdataworld.get(minecraftkey);
 
             if (advancementholder == null) {
+                if (!minecraftkey.getNamespace().equals("minecraft")) return; // CraftBukkit
                 AdvancementDataPlayer.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", minecraftkey, this.playerSavePath);
             } else {
                 this.startProgress(advancementholder, advancementprogress);
@@ -227,6 +228,7 @@
             this.progressChanged.add(advancementholder);
             flag = true;
             if (!flag1 && advancementprogress.isDone()) {
+                this.player.level().getCraftServer().getPluginManager().callEvent(new org.bukkit.event.player.PlayerAdvancementDoneEvent(this.player.getBukkitEntity(), advancementholder.toBukkit())); // CraftBukkit
                 advancementholder.value().rewards().grant(this.player);
                 advancementholder.value().display().ifPresent((advancementdisplay) -> {
                     if (advancementdisplay.shouldAnnounceChat() && this.player.level().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {