2020-04-02 21:07:06 +00:00
|
|
|
From a8c6001fe5db7539f88f646d7d5eb2f696e0c512 Mon Sep 17 00:00:00 2001
|
2018-01-21 18:23:34 +00: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-04-02 21:07:06 +00:00
|
|
|
index ca661f3933..c41e138472 100644
|
2018-01-21 18:23:34 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
2019-04-28 17:59:47 +00:00
|
|
|
@@ -276,6 +276,12 @@ public class AdvancementDataPlayer {
|
2018-01-21 18:23:34 +00: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);
|
|
|
|
this.i.add(advancement);
|
|
|
|
flag = true;
|
|
|
|
--
|
2020-04-02 21:07:06 +00:00
|
|
|
2.25.1
|
2018-01-21 18:23:34 +00:00
|
|
|
|