Because every mod has to have exploding arrows - amiright?
This commit is contained in:
parent
fa58ba7322
commit
eb53a45973
1 changed files with 12 additions and 0 deletions
12
bukkit-plugin/experimental/exploding-arrows.js
Normal file
12
bukkit-plugin/experimental/exploding-arrows.js
Normal 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);
|
||||
}
|
||||
});
|
Reference in a new issue