I know there is an event for when an egg is thrown, is there one for a Snowball? Because I cannot seem to find one and I would rather not use eggs because I really dont want chickens running around all over the place. If there is a way to make the eggs not spawn chickens, that would work aswell EDIT by Moderator: merged posts, please use the edit button instead of double posting.
You have to use the ProjectileLaunchEvent. From that event, do Code:java if(event.getEntity() instanceof Snowball) { //Execute code here for snowball launch} Hope this helped! Let me know if you need more assistance
Code:java if(event.getEntity() instanceof Snowball) { Snowball snow = (Snowball) event.getEntity(); if(snow.getShooter() instanceof Player) { Player p = (Player) snow.getShooter(); }} Code isnt tested but it should work.