Prevent block place above 320

This commit is contained in:
nucker 2023-01-05 18:12:04 +00:00
parent f291437ada
commit d226c3994a

View File

@ -131,6 +131,7 @@ public class BlockPlacementListener {
// BlockPlacementRule check
Block resultBlock = playerBlockPlaceEvent.getBlock();
final BlockPlacementRule blockPlacementRule = BLOCK_MANAGER.getBlockPlacementRule(resultBlock);
if(placementPosition.y() >= 320) return;
if (blockPlacementRule != null) {
// Get id from block placement rule instead of the event
resultBlock = blockPlacementRule.blockPlace(instance, resultBlock, blockFace, blockPosition, player);