Cancel block placing if its on tall grass

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

lukep999

Member
Jul 30, 2017
3
0
0
Hi,
My idea is that when a player places a block, it checks whether the space they're placing the block is air or not. For example, if there is tall grass on the ground and a player places a block there, it will remove the tall grass and replace it with the block. I would like it so players are not able to place blocks on tall grass. My addons are SkQuery, SkRayfall, Skellett and Umbaka.

Thank you.
 
Not the best because i'm a beginner, but this should work:

code_language.skript:
on place:
    loop blocks in radius 1 of block:
        if loop-blocks is 31:1 or 175:2:
            cancel event
            message "&c&lHey! &r&7Sorry, but you can't place blocks near grass!"