svdragster

Untitled

Nov 12th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.11 KB | None | 0 0
  1.         if (!player.getGameMode().equals(GameMode.SPECTATOR)) {
  2.             Block insideBlock = Useful.getBlockRelative(event.getTo(), 0, 0, 0);
  3.             boolean semiSolid = Useful.isSemiSolid(insideBlock);
  4.             if (!semiSolid) {
  5.                 //PhaseCheck:
  6.                 if (getOwner().inWorld(worldname, DetectionType.BLOCK_PHASE)) {
  7.                     List<Block> blocks = Useful.getSolidBlocks(event.getTo(), 0, 0.3000);
  8.                     if (blocks.size() > 0) {
  9.                         if (Useful.isSolid(insideBlock)) {
  10.                             //player.teleport(stats.getFromLocationEvent());
  11.                             resetLocation(stats);
  12.                             getOwner().alert(player, player.getName() + ": Block Phase (1)", null, AlertPriority.LOW, 0, DetectionType.BLOCK_PHASE);
  13.                         }
  14.                     }
  15.                 }
  16.             } else {
  17.                 if (Useful.isSolid(insideBlock) && !Useful.isFence(insideBlock.getType()) && !Useful.isGlassPane(insideBlock.getType())) {
  18.                     if (getOwner().inWorld(worldname, DetectionType.BLOCK_PHASE)) {
  19.                         //player.teleport(stats.getFromLocationEvent());
  20.                         resetLocation(stats);
  21.                         getOwner().alert(player, player.getName() + ": Block Phase (2)", null, AlertPriority.LOW, 0, DetectionType.BLOCK_PHASE);
  22.                     }
  23.                 }
  24.             }
  25.         }
Advertisement
Add Comment
Please, Sign In to add comment