How to allow block place on certain blocks only?

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

JustADev

Well-Known Member
Apr 8, 2017
379
9
18
22
Can anyone tell me how to allow block placing on certain blocks? Like on Endstone, Nether rack, etc?
 
Check the even-block, I believe maybe something like this. the syntax may be a bit off
code_language.skript:
on place:
    if event-block is not obsidian:
        cancel event
[doublepost=1501299829,1501299786][/doublepost]oof just a second too late x3
 
What i meant to say is that to overide world guard regions to place oak logs and oak planks
I don't know if this will bypass WG but give it a shot
code_language.skript:
on place:
    if "%region%" is "YourRegionHere in world world":
        if player is holding planks:
            set event-block to planks
        if player is holding oak log:
            set event-block to log
 
hmm, so what should i make it to?
You may be better off just using WG itself. I do believe it has per block permission if memory serves. they're a bit tedious though.
What might be even easier is just allowing people to build in a region with WG and then using skript to determine where they can't
 
Try using the on can build check event instead as the block technically isn't being placed like so:

code_language.skript:
on can build check:
    if "%region%" is "YourRegionHere in world world":
        if player is holding planks:
            set event-block to planks
        if player is holding oak log:
            set event-block to log
 
Last edited by a moderator:
Status
Not open for further replies.