summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
authort00thpick1 <t00thpick1dirko@gmail.com>2014-01-14 23:42:40 -0500
committerWesley Wolfe <weswolf@aol.com>2014-01-16 00:51:04 -0600
commit622a2976d97775df8650d92be44cdb67ca4012ca (patch)
tree4d5112db2b7ac21d729d0c86cf9746e61e8c45da /src/main/java/net/minecraft/server
parentdd12820c58871c6e05b6a8cbe9197ac64c6a00a3 (diff)
downloadcraftbukkit-622a2976d97775df8650d92be44cdb67ca4012ca.tar
craftbukkit-622a2976d97775df8650d92be44cdb67ca4012ca.tar.gz
craftbukkit-622a2976d97775df8650d92be44cdb67ca4012ca.tar.lz
craftbukkit-622a2976d97775df8650d92be44cdb67ca4012ca.tar.xz
craftbukkit-622a2976d97775df8650d92be44cdb67ca4012ca.zip
[Bleeding] Fix Achievements and Statistics API. Fixes BUKKIT-5305
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/StatisticManager.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/StatisticManager.java b/src/main/java/net/minecraft/server/StatisticManager.java
index ba8e2134..86d186a5 100644
--- a/src/main/java/net/minecraft/server/StatisticManager.java
+++ b/src/main/java/net/minecraft/server/StatisticManager.java
@@ -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);
}
}