3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-28 00:50:08 +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
2019-04-23 04:00:00 +02:00
@@ -160,7 +160,11 @@
2018-07-15 02:00:00 +02:00
Advancement advancement = this.d.getAdvancementData().a((MinecraftKey) entry.getKey());
if (advancement == null) {
2019-04-25 04:00:00 +02:00
- AdvancementDataPlayer.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.e);
2018-07-15 02:00:00 +02:00
+ // CraftBukkit start
2019-04-27 01:26:19 +02:00
+ if (entry.getKey().b().equals("minecraft")) {
2019-04-25 04:00:00 +02:00
+ AdvancementDataPlayer.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.e);
2018-07-15 02:00:00 +02:00
+ }
+ // CraftBukkit end
} else {
this.a(advancement, (AdvancementProgress) entry.getValue());
}
2019-04-23 04:00:00 +02:00
@@ -275,6 +279,7 @@
2017-05-14 04:00:00 +02:00
this.i.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);
2019-06-21 12:00:00 +02:00
if (advancement.c() != null && advancement.c().i() && this.player.world.getGameRules().getBoolean(GameRules.ANNOUNCE_ADVANCEMENTS)) {
2019-05-27 22:30:00 +02:00
this.d.getPlayerList().sendMessage(new ChatMessage("chat.type.advancement." + advancement.c().e().a(), new Object[]{this.player.getScoreboardDisplayName(), advancement.j()}));