2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-01-21 19:23:34 +01:00
|
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
|
|
Date: Fri, 19 Jan 2018 08:15:29 -0600
|
|
|
|
Subject: [PATCH] PlayerAdvancementCriterionGrantEvent
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
2020-06-25 15:11:48 +02:00
|
|
|
index 12fc641299342a317177cf0ab876186fb8a2b760..57b9d13447a4f7804827c1bd41121c3069c696bd 100644
|
2018-01-21 19:23:34 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
2020-06-25 15:11:48 +02:00
|
|
|
@@ -279,6 +279,12 @@ public class AdvancementDataPlayer {
|
2018-01-21 19:23:34 +01:00
|
|
|
boolean flag1 = advancementprogress.isDone();
|
|
|
|
|
|
|
|
if (advancementprogress.a(s)) {
|
|
|
|
+ // Paper start
|
|
|
|
+ if (!new com.destroystokyo.paper.event.player.PlayerAdvancementCriterionGrantEvent(this.player.getBukkitEntity(), advancement.bukkit, s).callEvent()) {
|
|
|
|
+ advancementprogress.b(s);
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
this.d(advancement);
|
2020-06-25 15:11:48 +02:00
|
|
|
this.j.add(advancement);
|
2018-01-21 19:23:34 +01:00
|
|
|
flag = true;
|