Skip to content

Commit

Permalink
Fix - determine projectile:
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Jul 29, 2013
1 parent e7af77e commit 3961db3
Showing 1 changed file with 10 additions and 3 deletions.
Expand Up @@ -718,9 +718,16 @@ public void entityShootBow(EntityShootBowEvent event) {
entity.getType().name() + " shoots arrow"),
null, null, context);

if (determination.toUpperCase().startsWith("PROJECTILE")) {
Entity replaced = entity.getWorld().spawnEntity(entity.getLocation(), EntityType.valueOf(aH.getStringFrom(determination)));
event.setProjectile(replaced);
if (dEntity.matches(determination)) {
dEntity newProjectile = dEntity.valueOf(determination);
if (!newProjectile.isSpawned())
try {
newProjectile = new dEntity(entity.getWorld().spawnEntity(entity.getLocation(), EntityType.valueOf(aH.getStringFrom(determination))));
event.setProjectile(newProjectile.getBukkitEntity());
}
catch(Exception e){}
else
event.setProjectile(newProjectile.getBukkitEntity());
}

if (determination.toUpperCase().startsWith("CANCELLED"))
Expand Down

0 comments on commit 3961db3

Please sign in to comment.