2017-05-14 04:00:00 +02:00
|
|
|
--- a/net/minecraft/server/AdvancementDataPlayer.java
|
|
|
|
+++ b/net/minecraft/server/AdvancementDataPlayer.java
|
2023-03-14 17:30:00 +01:00
|
|
|
@@ -144,7 +144,11 @@
|
2021-11-21 23:00:00 +01:00
|
|
|
Advancement advancement = advancementdataworld.getAdvancement((MinecraftKey) entry.getKey());
|
2018-07-15 02:00:00 +02:00
|
|
|
|
|
|
|
if (advancement == null) {
|
2023-03-14 17:30:00 +01:00
|
|
|
- AdvancementDataPlayer.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.playerSavePath);
|
2018-07-15 02:00:00 +02:00
|
|
|
+ // CraftBukkit start
|
2019-07-20 01:00:00 +02:00
|
|
|
+ if (entry.getKey().getNamespace().equals("minecraft")) {
|
2023-03-14 17:30:00 +01:00
|
|
|
+ AdvancementDataPlayer.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.playerSavePath);
|
2018-07-15 02:00:00 +02:00
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
} else {
|
2021-11-21 23:00:00 +01:00
|
|
|
this.startProgress(advancement, (AdvancementProgress) entry.getValue());
|
2023-03-14 17:30:00 +01:00
|
|
|
this.progressChanged.add(advancement);
|
|
|
|
@@ -227,6 +231,7 @@
|
2021-06-11 07:00:00 +02:00
|
|
|
this.progressChanged.add(advancement);
|
2017-05-14 04:00:00 +02:00
|
|
|
flag = true;
|
|
|
|
if (!flag1 && advancementprogress.isDone()) {
|
2023-06-07 17:30:00 +02:00
|
|
|
+ this.player.level().getCraftServer().getPluginManager().callEvent(new org.bukkit.event.player.PlayerAdvancementDoneEvent(this.player.getBukkitEntity(), advancement.bukkit)); // CraftBukkit
|
2021-11-21 23:00:00 +01:00
|
|
|
advancement.getRewards().grant(this.player);
|
2023-06-07 17:30:00 +02:00
|
|
|
if (advancement.getDisplay() != null && advancement.getDisplay().shouldAnnounceChat() && this.player.level().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {
|
2022-07-27 20:00:00 +02:00
|
|
|
this.playerList.broadcastSystemMessage(IChatBaseComponent.translatable("chat.type.advancement." + advancement.getDisplay().getFrame().getName(), this.player.getDisplayName(), advancement.getChatComponent()), false);
|