Permalink
Browse files

Move the BetterPhysics fix, to work for all ladders in a line, not ju…

…st the above one.
  • Loading branch information...
me4502 committed Nov 15, 2016
1 parent 83038fc commit a125627d4c088edd41426faf6ec650ef36e59ecb
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/java/com/sk89q/craftbook/mechanics/BetterPhysics.java
@@ -33,7 +33,6 @@ public void onBlockBreak(BlockBreakEvent event) {
return;
checkForPhysics(event.getBlock());
- checkForPhysics(event.getBlock().getRelative(BlockFace.UP));
}
@EventHandler(priority = EventPriority.MONITOR)
@@ -54,8 +53,10 @@ public void onBlockUpdate(BlockPhysicsEvent event) {
}
private static void checkForPhysics(Block block) {
- if(FallingLadders.isValid(block))
+ if(FallingLadders.isValid(block)) {
Bukkit.getScheduler().runTask(CraftBookPlugin.inst(), new FallingLadders(block));
+ checkForPhysics(block.getRelative(BlockFace.UP));
+ }
}
private static class FallingLadders implements Runnable {

0 comments on commit a125627

Please sign in to comment.