Guest User

Untitled

a guest
Aug 13th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1.     @EventHandler
  2.     public void onMovePlayer(PlayerMoveEvent e){
  3.        
  4.         Player p = e.getPlayer();
  5.        
  6.         if(p.getLocation().getBlock().getRelative(0, -1, 0).getType() == Material.STAINED_CLAY){
  7.             p.getLocation().getBlock().getRelative(0, -1, 0).setType(Material.AIR);
  8.         }
  9.        
  10.         if(p.getLocation().getBlock().getType() == Material.WATER || p.getLocation().getBlock().getType() == Material.STATIONARY_WATER){
  11.             p.setGameMode(GameMode.SPECTATOR);
  12.         }
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment