Shouldn't this code create a ground smash so when I jump and sneak and hit the ground there is an explosion like a Ground Pound... that does no damage to your player only terrain Spoiler (Move your mouse to the spoiler area to reveal the content) Show Spoiler Hide Spoiler Code: @EventHandler public void noDamage(EntityDamageEvent event) { if ((event.getEntity() instanceof Player)) { Entity p = event.getEntity(); Player player = (Player)event.getEntity(); if ((event.getCause() == EntityDamageEvent.DamageCause.FALL) && (player.isSneaking())) { Location l = player.getLocation(); player.getWorld().createExplosion(l.getX(), l.getY(), l.getZ(), 3);} } }
Ok I will try Nope EDIT by Moderator: merged posts, please use the edit button instead of double posting.
The EntityDamage event will work but only if the player drops from more than three blocks. Unfortunately I think you would be looking for the PlayerMoveEvent.
This would only work if the player fell from more than three blocks. To achieve a ground pound from 1-3 blocks, you would need to listen to player move event which unfortunately would put more stress on the server. But it can still be done pretty easily.
GodzOfMadness I'm probably thinking too much of Smash here: on sneak event, check if midair, throw towards ground and use a BukkitRunnable to check if the block under their feet isnt air, then do the pound? If this isn't what you mean then I apologise :c
Ok so basically all I need is to know how to make it so when you jump sneak it creates an explosion on land
snake4212 the way I did it in a smash plugin I made was when they sneak in the air they will be added to a string list. On PlayerMoveEvent, I checked if they were in the list, if they were on the ground, and then added an explosion and removed them from the list.