Because every mod has to have exploding arrows - amiright?

This commit is contained in:
walterhiggins 2013-01-09 23:55:12 +00:00
parent fa58ba7322
commit eb53a45973

View file

@ -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);
}
});