mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 11:42:55 +01:00
27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
|
From 7dcca0ffd7f69ff6634cb8cdffc4180fda1975aa Mon Sep 17 00:00:00 2001
|
||
|
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
|
||
|
index 6896b709..8913e274 100644
|
||
|
--- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
||
|
+++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java
|
||
|
@@ -196,6 +196,12 @@ public class AdvancementDataPlayer {
|
||
|
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;
|
||
|
--
|
||
|
2.11.0
|
||
|
|