3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-24 15:20:11 +01:00
Paper/nms-patches/AdvancementDataPlayer.patch

24 Zeilen
1.7 KiB
Diff

2017-05-14 04:00:00 +02:00
--- a/net/minecraft/server/AdvancementDataPlayer.java
+++ b/net/minecraft/server/AdvancementDataPlayer.java
2020-06-25 02:00:00 +02:00
@@ -163,7 +163,11 @@
Advancement advancement = advancementdataworld.a((MinecraftKey) entry.getKey());
2018-07-15 02:00:00 +02:00
if (advancement == null) {
2020-06-25 02:00:00 +02:00
- AdvancementDataPlayer.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.f);
2018-07-15 02:00:00 +02:00
+ // CraftBukkit start
2019-07-20 01:00:00 +02:00
+ if (entry.getKey().getNamespace().equals("minecraft")) {
2020-06-25 02:00:00 +02:00
+ AdvancementDataPlayer.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.f);
2018-07-15 02:00:00 +02:00
+ }
+ // CraftBukkit end
} else {
this.a(advancement, (AdvancementProgress) entry.getValue());
}
2020-06-25 02:00:00 +02:00
@@ -278,6 +282,7 @@
this.j.add(advancement);
2017-05-14 04:00:00 +02:00
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);
2019-06-21 12:00:00 +02:00
if (advancement.c() != null && advancement.c().i() && this.player.world.getGameRules().getBoolean(GameRules.ANNOUNCE_ADVANCEMENTS)) {
2020-06-25 02:00:00 +02:00
this.e.sendMessage(new ChatMessage("chat.type.advancement." + advancement.c().e().a(), new Object[]{this.player.getScoreboardDisplayName(), advancement.j()}), ChatMessageType.SYSTEM, SystemUtils.b);