Skip to content

Instantly share code, notes, and snippets.

@Dinner1111
Created August 2, 2013 15:17
Show Gist options
  • Save Dinner1111/6140675 to your computer and use it in GitHub Desktop.
Save Dinner1111/6140675 to your computer and use it in GitHub Desktop.
@EventHandler
public void onPlayerInteract(PlayerInteractEvent e) {
if (p.getItemInHand().getType() == Material.FIREWORK_CHARGE && (e.getAction().equals(Action.RIGHT_CLICK_AIR) || e.getAction().equals(Action.RIGHT_CLICK_BLOCK))) {
p.getWorld().dropItemNaturally(p.getLocation(), new ItemStack(Material.FIREWORK_CHARGE));
p.sendMessage("it worked :D");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment