funkemunky

Untitled

Dec 16th, 2017
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.71 KB | None | 0 0
  1. if (PlayerUtils.isReallyOnground(p) && !MiscUtils.isInWeb(p) && !e.isCancelled() && !PlayerUtils.isOnClimbable(p, 0) && !PlayerUtils.isOnClimbable(p, -1) && !user.isTeleported() && !p.hasPotionEffect(PotionEffectType.JUMP)
  2. && above.getBlock().getType() == Material.AIR && loc2.getBlock().getType() == Material.AIR
  3. && onGroundDiff > 0 && onGroundDiff != 0 && onGroundDiff != 0.41999998688697815
  4. && onGroundDiff != 0.33319999363422426 && onGroundDiff != 0.1568672884460831
  5. && onGroundDiff != 0.4044491418477924 && onGroundDiff != 0.4044449141847757
  6. && onGroundDiff != 0.40444491418477746 && onGroundDiff != 0.24813599859094637
  7. && onGroundDiff != 0.1647732812606676 && onGroundDiff != 0.24006865856430082
  8. && onGroundDiff != 0.20000004768370516 && onGroundDiff != 0.19123230896968835
  9. && onGroundDiff != 0.10900766491188207 && onGroundDiff != 0.20000004768371227
  10. && onGroundDiff != 0.40444491418477924 && onGroundDiff != 0.0030162615090425504
  11. && onGroundDiff != 0.05999999821186108 && onGroundDiff != 0.05199999886751172
  12. && onGroundDiff != 0.06159999881982792 && onGroundDiff != 0.06927999889612124
  13. && onGroundDiff != 0.07542399904870933 && onGroundDiff != 0.07532994414328797
  14. && onGroundDiff != 0.08033919924402255 && onGroundDiff != 0.5 && onGroundDiff != 0.08427135945886555
  15. && onGroundDiff != 0.340000110268593 && onGroundDiff != 0.30000001192092896
  16. && onGroundDiff != 0.3955758986732967 && onGroundDiff != 0.019999999105930755
  17. && onGroundDiff != 0.21560001587867816 && onGroundDiff != 0.13283301814746876
  18. && onGroundDiff != 0.05193025879327907 && onGroundDiff != 0.1875 && onGroundDiff != 0.375
  19. && onGroundDiff != 0.08307781780646728 && onGroundDiff != 0.125 && onGroundDiff != 0.25
  20. && onGroundDiff != 0.01250004768371582 && onGroundDiff != 0.1176000022888175
  21. && onGroundDiff != 0.0625 && onGroundDiff != 0.20000004768371582
  22. && onGroundDiff != 0.4044448882341385 && onGroundDiff != 0.40444491418477835
  23. && onGroundDiff != 0.019999999105934307 && onGroundDiff != 0.4375
  24. && onGroundDiff != 0.36510663985490055 && onGroundDiff != 0.4641593749554431
  25. && onGroundDiff != 0.3841593618424213 && onGroundDiff != 0.2000000476837016) {
  26. user.setVL(Speed.this, vl + 1);
  27. alert(p, Color.Gray + "Reason: " + Color.White + "NormalMovements " + Color.Gray + "Illegal Value: " + Color.White + onGroundDiff);
  28. }
  29. public static boolean isInWeb(Player player) {
  30. if (player.getLocation().getBlock().getType() != Material.WEB && player.getLocation().getBlock().getRelative(BlockFace.DOWN).getType() != Material.WEB && player.getLocation().getBlock().getRelative(BlockFace.UP).getType() != Material.WEB) {
  31. return false;
  32. }
  33. return true;
  34. }
  35. public static boolean isReallyOnground(Player p) {
  36. Location l = p.getLocation();
  37. int x = l.getBlockX();
  38. int y = l.getBlockY();
  39. int z = l.getBlockZ();
  40. Location b = new Location(p.getWorld(), x, y - 1, z);
  41.  
  42. if (p.isOnGround() && b.getBlock().getType() != Material.AIR && b.getBlock().getType() != Material.WEB
  43. && !b.getBlock().isLiquid()) {
  44. return true;
  45. } else {
  46. return false;
  47. }
  48. }
  49.  
  50. public static boolean isOnClimbable(Player player, int blocks) {
  51. if(blocks == 0) {
  52. for (Block block : BlockUtils.getSurrounding(player.getLocation().getBlock(), false)) {
  53. if (block.getType() == Material.LADDER || block.getType() == Material.VINE) {
  54. return true;
  55. }
  56. }
  57. } else {
  58. for (Block block : BlockUtils.getSurrounding(player.getLocation().clone().add(0.0D, 1.0D, 0.0D).getBlock(), false)) {
  59. if (block.getType() == Material.LADDER || block.getType() == Material.VINE) {
  60. return true;
  61. }
  62. }
  63. }
  64. return player.getLocation().getBlock().getType() == Material.LADDER || player.getLocation().getBlock().getType() == Material.VINE;
  65. }
  66. public static ArrayList<Block> getSurrounding(Block block, boolean diagonals) {
  67. ArrayList<Block> blocks = new ArrayList<Block>();
  68. if (diagonals) {
  69. for (int x = -1; x <= 1; x++) {
  70. for (int y = -1; y <= 1; y++) {
  71. for (int z = -1; z <= 1; z++) {
  72. if ((x != 0) || (y != 0) || (z != 0)) {
  73. blocks.add(block.getRelative(x, y, z));
  74. }
  75. }
  76. }
  77. }
  78. } else {
  79. blocks.add(block.getRelative(BlockFace.UP));
  80. blocks.add(block.getRelative(BlockFace.DOWN));
  81. blocks.add(block.getRelative(BlockFace.NORTH));
  82. blocks.add(block.getRelative(BlockFace.SOUTH));
  83. blocks.add(block.getRelative(BlockFace.EAST));
  84. blocks.add(block.getRelative(BlockFace.WEST));
  85. }
  86. return blocks;
  87. }
Advertisement
Add Comment
Please, Sign In to add comment