Skip to content

Commit

Permalink
fix possible issues with legacy mc versions
Browse files Browse the repository at this point in the history
  • Loading branch information
MetallicGoat committed Jan 19, 2024
1 parent d5dba04 commit 6c971f8
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,11 @@ private void placeBlock(Arena arena, boolean isLadder, Block block, DyeColor col

} else {
final BlockState state = block.getState();
final org.bukkit.material.Ladder legacyLadder = new org.bukkit.material.Ladder();
legacyLadder.setFacingDirection(this.direction.getOppositeFace());
state.setData(legacyLadder);
state.update();

if (state.getData() instanceof org.bukkit.material.Ladder) {
((org.bukkit.material.Ladder) state.getData()).setFacingDirection(this.direction.getOppositeFace());
state.update();
}
}
}

Expand Down

0 comments on commit 6c971f8

Please sign in to comment.