Paper/nms-patches/AdvancementDataPlayer.patch
2020-06-25 10:00:00 +10:00

24 lines
1.7 KiB
Diff

--- a/net/minecraft/server/AdvancementDataPlayer.java
+++ b/net/minecraft/server/AdvancementDataPlayer.java
@@ -163,7 +163,11 @@
Advancement advancement = advancementdataworld.a((MinecraftKey) entry.getKey());
if (advancement == null) {
- AdvancementDataPlayer.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.f);
+ // CraftBukkit start
+ if (entry.getKey().getNamespace().equals("minecraft")) {
+ AdvancementDataPlayer.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.f);
+ }
+ // CraftBukkit end
} else {
this.a(advancement, (AdvancementProgress) entry.getValue());
}
@@ -278,6 +282,7 @@
this.j.add(advancement);
flag = true;
if (!flag1 && advancementprogress.isDone()) {
+ this.player.world.getServer().getPluginManager().callEvent(new org.bukkit.event.player.PlayerAdvancementDoneEvent(this.player.getBukkitEntity(), advancement.bukkit)); // CraftBukkit
advancement.d().a(this.player);
if (advancement.c() != null && advancement.c().i() && this.player.world.getGameRules().getBoolean(GameRules.ANNOUNCE_ADVANCEMENTS)) {
this.e.sendMessage(new ChatMessage("chat.type.advancement." + advancement.c().e().a(), new Object[]{this.player.getScoreboardDisplayName(), advancement.j()}), ChatMessageType.SYSTEM, SystemUtils.b);