How to toggle block placing

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

    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
NEED: a command to toggle block placing


CODE:

code_language.skript:
on place of planks:0:
    add location of event-block to {locations::*}
on place of oak log:
    add location of event-block to {locations::*}
on place of water:
    add location of event-block to {locations::*}
on place of fire:
    add location of event-block to {locations::*}
  
On block place:
    If event-block is planks:0:
        wait 5 seconds
        Set event-block to air
    If event-block is oak log:
        wait 5 seconds
        Set event-block to air
    If event-block is water:
        wait 5 seconds
        Set event-block to air
    If event-block is fire:
        wait 5 seconds
        Set event-block to air
        
command /buildmode:
    trigger:
        if {buildmode::%player%} is not set:
            set {build::%player%} to false:
        if {build::%player%} is false:
            send "&8[&aTest&8]"
 
Code:
on place:
     if {build.%player%} is set:
          cancel event

command build:
     trigger:
          if {build.%player%} is not set:
               set {build.%player%} to true
          else:
               delete {build.%player%}
 
Status
Not open for further replies.