2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/StatisticManager.java
|
|
|
|
+++ b/net/minecraft/server/StatisticManager.java
|
2018-07-15 02:00:00 +02:00
|
|
|
@@ -13,6 +13,12 @@
|
|
|
|
}
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2018-07-15 02:00:00 +02:00
|
|
|
public void b(EntityHuman entityhuman, Statistic<?> statistic, int i) {
|
2017-05-14 04:00:00 +02:00
|
|
|
+ // CraftBukkit start - fire Statistic events
|
|
|
|
+ org.bukkit.event.Cancellable cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.handleStatisticsIncrease(entityhuman, statistic, this.getStatisticValue(statistic), i);
|
|
|
|
+ if (cancellable != null && cancellable.isCancelled()) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
this.setStatistic(entityhuman, statistic, this.getStatisticValue(statistic) + i);
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
2015-02-26 23:41:06 +01:00
|
|
|
|