Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (!player.getGameMode().equals(GameMode.SPECTATOR)) {
- Block insideBlock = Useful.getBlockRelative(event.getTo(), 0, 0, 0);
- boolean semiSolid = Useful.isSemiSolid(insideBlock);
- if (!semiSolid) {
- //PhaseCheck:
- if (getOwner().inWorld(worldname, DetectionType.BLOCK_PHASE)) {
- List<Block> blocks = Useful.getSolidBlocks(event.getTo(), 0, 0.3000);
- if (blocks.size() > 0) {
- if (Useful.isSolid(insideBlock)) {
- //player.teleport(stats.getFromLocationEvent());
- resetLocation(stats);
- getOwner().alert(player, player.getName() + ": Block Phase (1)", null, AlertPriority.LOW, 0, DetectionType.BLOCK_PHASE);
- }
- }
- }
- } else {
- if (Useful.isSolid(insideBlock) && !Useful.isFence(insideBlock.getType()) && !Useful.isGlassPane(insideBlock.getType())) {
- if (getOwner().inWorld(worldname, DetectionType.BLOCK_PHASE)) {
- //player.teleport(stats.getFromLocationEvent());
- resetLocation(stats);
- getOwner().alert(player, player.getName() + ": Block Phase (2)", null, AlertPriority.LOW, 0, DetectionType.BLOCK_PHASE);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment