Advertisement
Guest User

Untitled

a guest
May 24th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. public class JumpPads implements Listener {
  2.  
  3. public JumpPads(main pl){
  4. pl.getServer().getPluginManager().registerEvents(this, pl);
  5. }
  6.  
  7. @SuppressWarnings("deprecation")
  8. @EventHandler
  9. public void onJump(PlayerMoveEvent e){
  10. Player z = e.getPlayer();
  11. if (z.getLocation().getBlock().getType() == Material.STONE_PLATE) {
  12. if (z.getLocation().subtract(0D, 1D, 0D).getBlock().getType() == Material.GOLD_BLOCK) {
  13. Vector v = z.getLocation().getDirection().multiply(5D).setY(0.7D);
  14.  
  15. z.setVelocity(v);
  16.  
  17. z.playEffect(z.getLocation(), Effect.ENDER_SIGNAL, 5);
  18. z.playSound(z.getLocation(), Sound.WITHER_SHOOT, 1F, 1F);
  19.  
  20.  
  21. }
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement