mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
19 lines
1.2 KiB
Diff
19 lines
1.2 KiB
Diff
|
--- a/net/minecraft/server/PlayerAdvancements.java
|
||
|
+++ b/net/minecraft/server/PlayerAdvancements.java
|
||
|
@@ -196,6 +196,7 @@
|
||
|
AdvancementHolder advancementholder = loader.get(minecraftkey);
|
||
|
|
||
|
if (advancementholder == null) {
|
||
|
+ if (!minecraftkey.getNamespace().equals("minecraft")) return; // CraftBukkit
|
||
|
PlayerAdvancements.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", minecraftkey, this.playerSavePath);
|
||
|
} else {
|
||
|
this.startProgress(advancementholder, advancementprogress);
|
||
|
@@ -227,6 +228,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.toBukkit())); // CraftBukkit
|
||
|
advancement.value().rewards().grant(this.player);
|
||
|
advancement.value().display().ifPresent((advancementdisplay) -> {
|
||
|
if (advancementdisplay.shouldAnnounceChat() && this.player.serverLevel().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {
|