Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void checkWaterwalk(PlayerMoveEvent event) {
- Player player = event.getPlayer();
- Location location = player.getLocation().subtract(0, 2, 0);
- if (player.getGameMode() != GameMode.CREATIVE || player.getGameMode() != GameMode.SPECTATOR) {
- if (location.getBlock().getType() == Material.STATIONARY_WATER
- && player.getLocation().getBlock().getType() == Material.WATER) {
- getDetection(player).check(CheckType.WATERWALK);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement