geforkt von Mirrors/Paper
16 Zeilen
576 B
Diff
16 Zeilen
576 B
Diff
--- a/net/minecraft/stats/StatsCounter.java
|
|
+++ b/net/minecraft/stats/StatsCounter.java
|
|
@@ -18,6 +_,12 @@
|
|
}
|
|
|
|
public void setValue(Player player, Stat<?> stat, int value) {
|
|
+ // CraftBukkit start - fire Statistic events
|
|
+ org.bukkit.event.Cancellable cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.handleStatisticsIncrease(player, stat, this.getValue(stat), value);
|
|
+ if (cancellable != null && cancellable.isCancelled()) {
|
|
+ return;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
this.stats.put(stat, value);
|
|
}
|
|
|