13
0
geforkt von Mirrors/Paper
Paper/paper-server/nms-patches/BlockCoral.patch
CraftBukkit/Spigot 34e0e9da15 SPIGOT-4194: Call BlockFadeEvent for coral
By: md_5 <git@md-5.net>
2018-07-31 10:17:43 +10:00

15 Zeilen
609 B
Diff

--- a/net/minecraft/server/BlockCoral.java
+++ b/net/minecraft/server/BlockCoral.java
@@ -14,6 +14,11 @@
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
if (!this.a((IBlockAccess) world, blockposition)) {
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, blockposition, this.a.getBlockData()).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
world.setTypeAndData(blockposition, this.a.getBlockData(), 2);
}