mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 17:57:34 +01:00
9d740b84b0
By: md_5 <git@md-5.net>
24 lines
1.9 KiB
Diff
24 lines
1.9 KiB
Diff
--- a/net/minecraft/server/AdvancementDataPlayer.java
|
|
+++ b/net/minecraft/server/AdvancementDataPlayer.java
|
|
@@ -144,7 +144,11 @@
|
|
Advancement advancement = advancementdataworld.getAdvancement((MinecraftKey) entry.getKey());
|
|
|
|
if (advancement == null) {
|
|
- AdvancementDataPlayer.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.playerSavePath);
|
|
+ // CraftBukkit start
|
|
+ if (entry.getKey().getNamespace().equals("minecraft")) {
|
|
+ AdvancementDataPlayer.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.playerSavePath);
|
|
+ }
|
|
+ // CraftBukkit end
|
|
} else {
|
|
this.startProgress(advancement, (AdvancementProgress) entry.getValue());
|
|
this.progressChanged.add(advancement);
|
|
@@ -227,6 +231,7 @@
|
|
this.progressChanged.add(advancement);
|
|
flag = true;
|
|
if (!flag1 && advancementprogress.isDone()) {
|
|
+ this.player.level().getCraftServer().getPluginManager().callEvent(new org.bukkit.event.player.PlayerAdvancementDoneEvent(this.player.getBukkitEntity(), advancement.bukkit)); // CraftBukkit
|
|
advancement.getRewards().grant(this.player);
|
|
if (advancement.getDisplay() != null && advancement.getDisplay().shouldAnnounceChat() && this.player.level().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {
|
|
this.playerList.broadcastSystemMessage(IChatBaseComponent.translatable("chat.type.advancement." + advancement.getDisplay().getFrame().getName(), this.player.getDisplayName(), advancement.getChatComponent()), false);
|