Keeping Blocks same

  • 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
QUESTION: How do i make it so that when this is true, the blocks will stay the same?

CODE:
code_language.skript:
on block place:
    if {build.%player%} is set:
        if event-block is planks:0:
            wait 5 seconds
            set event-block to planks:0
        if event-block is oak log:
            wait 5 seconds
            set event-block to oak log
        if event-block is water:
            wait 5 seconds
            set event-block to water
        if event-block is fire:
            wait 5 seconds
            set event-block to fire
 
the blocks when buildmode is enableddisappear
[doublepost=1501386011,1501385815][/doublepost]
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:
    permission: staff.buildmode
    trigger:
        if {build.%player%} is not set:
            set {build.%player%} to true
            send "&8[&aBuildMode&8] &7BuildMode is now &a&lENABLED" to player
        else:
            delete {build.%player%}
            send "&8[&aBuildMode&8] &7BuildMode is now &c&lDISABLED" to player
    
on block place:
     if {build.%player%} is not set:
        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
        
on block place:
    if {build.%player%} is set:
        if event-block is planks:0:
            wait 5 seconds
            wait 1 tick
            set event-block to planks:0
        if event-block is oak log:
            wait 5 seconds
            wait 1 tick
            set event-block to oak log
        if event-block is water:
            wait 5 seconds
            wait 1 tick
            set event-block to water
        if event-block is fire:
            wait 5 seconds
            wait 1 tick
            set event-block to fire
 
code_language.skript:
# lol, I don't understand the question, but here's an example.
on block place:
    {buildmode::%player%} is set:
        wait second
        set block at event-location to event-block
    else:
        cancel event
        send "&cBuild mode is disabled. Please enable it to place blocks."
[doublepost=1501400492,1501386169][/doublepost]If problem is solved, please mark thread as Solved.
 
Last edited by a moderator:
Nope they dont work, when BlockPlace is enabled, it removes blocks...
 
Status
Not open for further replies.