mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-20 07:02:32 +01:00
Prevent block place above 320
This commit is contained in:
parent
f291437ada
commit
d226c3994a
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user