mirror of
https://github.com/garbagemule/MobArena.git
synced 2025-02-13 19:11:35 +01:00
Remove unused code block.
Turns out igniting TNT _doesn't_ fire a BlockIgniteEvent but rather an ExplosionPrimeEvent, which means this code has never actually been of any use. This code block was likely dead on arrival and has been dead for almost 9 years. Wonderful... The proper handling here would be to listen for the PlayerInteractEvent and detect flint and steel interactions with TNT blocks. This is super cumbersome, however, because the event handler would have to listen on the MONITOR priority to ensure that nothing changes down the line. What we are _actually_ need to do is remove the TNT block from the arena's block set when it is ignited, but since this hasn't worked for almost a decade, we're not really in a hurry to fix it now. It just makes for a slightly slower (but negligible) cleanup procedure most of the time.
This commit is contained in:
parent
d3e5d44cb2
commit
4470b60aaf
@ -360,17 +360,7 @@ public class ArenaListener
|
||||
case FLINT_AND_STEEL:
|
||||
if (arena.inEditMode()) return;
|
||||
if (arena.isRunning()) {
|
||||
if (b.getType() == Material.TNT) {
|
||||
Player planter = getPlanter(b);
|
||||
if (planter != null) {
|
||||
b.setType(Material.AIR);
|
||||
TNTPrimed tnt = b.getWorld().spawn(b.getLocation(), TNTPrimed.class);
|
||||
tnt.setSource(planter);
|
||||
setPlanter(tnt, planter);
|
||||
}
|
||||
} else {
|
||||
arena.addBlock(event.getBlock().getRelative(BlockFace.UP));
|
||||
}
|
||||
arena.addBlock(b.getRelative(BlockFace.UP));
|
||||
break;
|
||||
}
|
||||
case LIGHTNING:
|
||||
|
Loading…
Reference in New Issue
Block a user