Permalink
Browse files

Make the same CommandItem fix for projectile Launch as well.

  • Loading branch information...
me4502 committed Jan 24, 2017
1 parent 5551774 commit c9c4ad49513881ee9a5cf98e1f1e340946900b0c
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/main/java/com/sk89q/craftbook/mechanics/items/CommandItems.java
@@ -243,10 +243,13 @@ public void onProjectileLaunch(final ProjectileLaunchEvent event) {
if(((Player) event.getEntity().getShooter()).getItemInHand() == null)
return;
+ final ItemStack item = ((Player) event.getEntity().getShooter()).getItemInHand();
+ final Player shooter = (Player) event.getEntity().getShooter();
+
Bukkit.getScheduler().runTaskLater(CraftBookPlugin.inst(), new Runnable() {
@Override
public void run () {
- performCommandItems(((Player) event.getEntity().getShooter()).getItemInHand(), (Player) event.getEntity().getShooter(), event);
+ performCommandItems(item, shooter, event);
}
}, 5L);
}

0 comments on commit c9c4ad4

Please sign in to comment.