aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/server/PlayerAdvancements.java.patch
diff options
context:
space:
mode:
authorMiniDigger | Martin <[email protected]>2024-01-14 11:04:49 +0100
committerMiniDigger | Martin <[email protected]>2024-01-14 11:04:49 +0100
commitbee74680e607c2e29b038329f62181238911cd83 (patch)
tree708fd1a4a0227d9071243adf2a42d5e9e96cde4a /patch-remap/mache-spigotflower-stripped/net/minecraft/server/PlayerAdvancements.java.patch
parent0a44692ef6ff6e255d48eb3ba1bb114166eafda9 (diff)
downloadPaper-bee74680e607c2e29b038329f62181238911cd83.tar.gz
Paper-bee74680e607c2e29b038329f62181238911cd83.zip
add remapped patches as a testsoftspoon
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/server/PlayerAdvancements.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/server/PlayerAdvancements.java.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/server/PlayerAdvancements.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/PlayerAdvancements.java.patch
new file mode 100644
index 0000000000..51cacd75d0
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/PlayerAdvancements.java.patch
@@ -0,0 +1,20 @@
+--- a/net/minecraft/server/PlayerAdvancements.java
++++ b/net/minecraft/server/PlayerAdvancements.java
+@@ -196,7 +196,8 @@
+ AdvancementHolder advancementholder = serveradvancementmanager.get(resourcelocation);
+
+ if (advancementholder == null) {
+- PlayerAdvancements.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", resourcelocation, this.playerSavePath);
++ 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);
+ this.progressChanged.add(advancementholder);
+@@ -227,6 +228,7 @@
+ this.progressChanged.add(advancementholder);
+ flag = true;
+ if (!flag1 && advancementprogress.isDone()) {
++ this.player.level().getCraftServer().getPluginManager().callEvent(new org.bukkit.event.player.PlayerAdvancementDoneEvent(this.player.getBukkitEntity(), advancementholder.toBukkit())); // CraftBukkit
+ advancementholder.value().rewards().grant(this.player);
+ advancementholder.value().display().ifPresent((displayinfo) -> {
+ if (displayinfo.shouldAnnounceChat() && this.player.level().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {