Set source property on TNTPrimed entities.
This property makes TNT explosions look more "real" to other plugins who may be consuming events from MobArena's sessions. It also gives way to a potential rework of the "planter" logic that currently makes use of the Bukkit Metadata API. Closes #718
This commit is contained in:
@@ -286,6 +286,7 @@ public class ArenaListener
|
||||
}
|
||||
stack.setAmount(stack.getAmount() - 1);
|
||||
TNTPrimed tnt = b.getWorld().spawn(b.getRelative(BlockFace.UP).getLocation(), TNTPrimed.class);
|
||||
tnt.setSource(event.getPlayer());
|
||||
setPlanter(tnt, event.getPlayer());
|
||||
return;
|
||||
}
|
||||
@@ -364,6 +365,7 @@ public class ArenaListener
|
||||
if (planter != null) {
|
||||
b.setType(Material.AIR);
|
||||
TNTPrimed tnt = b.getWorld().spawn(b.getLocation(), TNTPrimed.class);
|
||||
tnt.setSource(planter);
|
||||
setPlanter(tnt, planter);
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user