aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/server/PlayerAdvancements.java.patch
blob: 51cacd75d0e7375ce943983ede9b1d0af50544f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/net/minecraft/server/PlayerAdvancements.java
+++ b/net/minecraft/server/PlayerAdvancements.java
@@ -196,7 +196,8 @@
             AdvancementHolder advancementholder = serveradvancementmanager.get(resourcelocation);
 
             if (advancementholder == null) {
-                PlayerAdvancements.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", resourcelocation, this.playerSavePath);
+                if (!minecraftkey.getNamespace().equals("minecraft")) return; // CraftBukkit
+                PlayerAdvancements.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", minecraftkey, this.playerSavePath);
             } else {
                 this.startProgress(advancementholder, advancementprogress);
                 this.progressChanged.add(advancementholder);
@@ -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((displayinfo) -> {
                     if (displayinfo.shouldAnnounceChat() && this.player.level().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {