mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 03:22:19 +01:00
8398e12b34
By: md_5 <git@md-5.net>
18 lines
1.3 KiB
Diff
18 lines
1.3 KiB
Diff
--- 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)) {
|