[Bleeding] Fix Achievements and Statistics API. Fixes BUKKIT-5305

This commit is contained in:
t00thpick1
2014-01-14 23:42:40 -05:00
committed by Wesley Wolfe
parent dd12820c58
commit 622a2976d9
8 changed files with 386 additions and 88 deletions

View File

@@ -20,6 +20,12 @@ public class StatisticManager {
public void b(EntityHuman entityhuman, Statistic statistic, int i) {
if (!statistic.d() || this.b((Achievement) statistic)) {
// CraftBukkit start
org.bukkit.event.Cancellable cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.handleStatisticsIncrease(entityhuman, statistic, a(statistic), i);
if (cancellable != null && cancellable.isCancelled()) {
return;
}
// CraftBukkit end
this.a(entityhuman, statistic, this.a(statistic) + i);
}
}