2018-07-23 16:39:55 +08:00
|
|
|
From 460396241443a00d258da20fd6e6717649361f94 Mon Sep 17 00:00:00 2001
|
2018-01-22 02:23:34 +08: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
|
2018-07-23 16:39:55 +08:00
|
|
|
index d0eb65aaf0..5fe0e947c3 100644
|
2018-01-22 02:23:34 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
2018-07-19 02:55:52 +08:00
|
|
|
@@ -232,6 +232,12 @@ public class AdvancementDataPlayer {
|
2018-01-22 02:23:34 +08: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;
|
|
|
|
--
|
2018-06-30 13:40:52 +08:00
|
|
|
2.18.0
|
2018-01-22 02:23:34 +08:00
|
|
|
|