3
0
KCauldronX/patches/net/minecraft/stats/StatFileWriter.java.patch
2015-03-22 20:38:04 +03:00

16 lines
759 B
Diff

--- ../src-base/minecraft/net/minecraft/stats/StatFileWriter.java
+++ ../src-work/minecraft/net/minecraft/stats/StatFileWriter.java
@@ -27,6 +27,12 @@
{
if (!p_150871_2_.isAchievement() || this.canUnlockAchievement((Achievement)p_150871_2_))
{
+ // CraftBukkit start
+ org.bukkit.event.Cancellable cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.handleStatisticsIncrease(p_150871_1_, p_150871_2_, this.writeStat(p_150871_2_), p_150871_3_);
+ if (cancellable != null && cancellable.isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
this.func_150873_a(p_150871_1_, p_150871_2_, this.writeStat(p_150871_2_) + p_150871_3_);
}
}