Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class JumpPads implements Listener {
- public JumpPads(main pl){
- pl.getServer().getPluginManager().registerEvents(this, pl);
- }
- @SuppressWarnings("deprecation")
- @EventHandler
- public void onJump(PlayerMoveEvent e){
- Player z = e.getPlayer();
- if (z.getLocation().getBlock().getType() == Material.STONE_PLATE) {
- if (z.getLocation().subtract(0D, 1D, 0D).getBlock().getType() == Material.GOLD_BLOCK) {
- Vector v = z.getLocation().getDirection().multiply(5D).setY(0.7D);
- z.setVelocity(v);
- z.playEffect(z.getLocation(), Effect.ENDER_SIGNAL, 5);
- z.playSound(z.getLocation(), Sound.WITHER_SHOOT, 1F, 1F);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement