SPIGOT-519: Add TNTPrimeEvent
Thanks to Pokechu22 for an earlier implementation By: Jishuna <joshl5324@gmail.com>
This commit is contained in:
@@ -114,7 +114,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -234,12 +269,24 @@
|
||||
@@ -234,12 +269,28 @@
|
||||
return iblockdata.hasProperty(BlockProperties.WATERLOGGED) && (Boolean) iblockdata.getValue(BlockProperties.WATERLOGGED) ? 0 : this.igniteOdds.getInt(iblockdata.getBlock());
|
||||
}
|
||||
|
||||
@@ -135,6 +135,10 @@
|
||||
+ if (event.isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (iblockdata.getBlock() instanceof BlockTNT && !CraftEventFactory.callTNTPrimeEvent(world, blockposition, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.FIRE, null, sourceposition)) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
if (randomsource.nextInt(j + 10) < 5 && !world.isRainingAt(blockposition)) {
|
||||
|
||||
Reference in New Issue
Block a user