forked from SteamWar/SteamWar
Fix TNT explosion logic to handle non-TNT entities correctly
Signed-off-by: Chaoscaot <max@maxsp.de>
This commit is contained in:
@@ -67,11 +67,7 @@ public class TNTListener implements Listener, ScoreboardElement {
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
||||||
public void onExplode(EntityExplodeEvent event) {
|
public void onExplode(EntityExplodeEvent event) {
|
||||||
if (!(event.getEntity() instanceof TNTPrimed)) {
|
explode(event.blockList(), event.getEntity() instanceof TNTPrimed);
|
||||||
event.blockList().clear();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
explode(event.blockList(), true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user