diff --git a/bukkit-plugin/experimental/exploding-arrows.js b/bukkit-plugin/experimental/exploding-arrows.js new file mode 100644 index 0000000..882bc93 --- /dev/null +++ b/bukkit-plugin/experimental/exploding-arrows.js @@ -0,0 +1,12 @@ +importPackage(org.bukkit.entity); +bukkit.on("entity.ProjectileHitEvent", function(listener, event){ + var projectile = event.entity; + var world = projectile.world; + // + // only want arrows shot by players to explode + // + if (projectile instanceof Arrow && projectile.shooter instanceof Player){ + projectile.remove(); + world.createExplosion(projectile.location,2.5); + } +});