1.15.2 Change max place limit

Discussion in 'Spigot Plugin Development' started by Aruzo69, Apr 1, 2020.

  1. how can i change limit radius where player can place block? From 3 to 5
     
  2. Check the player's location and check the distance between the placed block and the player's location if it's greater than 5 cancel it.
     
  3. You can call the BlockPlaceEvent, there you can get the Player which placed the block. After that you get the players location and the location of the placed block. Then you would need to do a bit of maths and check if the block is more then 3 blocks away. Then you can cancel the event so the Block wont be placed.
     
  4. I mean player can place block 15 blocks away from him
     
  5. I'm not sure I understand? What are you trying to do? I don't think it's possible for players to just place a block 15 blocks away lol