Advertisement
Guest User

Untitled

a guest
May 30th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. @EventHandler
  2. public void checkWaterwalk(PlayerMoveEvent event) {
  3. Player player = event.getPlayer();
  4.  
  5. Location location = player.getLocation().subtract(0, 2, 0);
  6.  
  7. if (player.getGameMode() != GameMode.CREATIVE || player.getGameMode() != GameMode.SPECTATOR) {
  8.  
  9. if (location.getBlock().getType() == Material.STATIONARY_WATER
  10. && player.getLocation().getBlock().getType() == Material.WATER) {
  11. getDetection(player).check(CheckType.WATERWALK);
  12. }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement