#How do you make it so that players can only break blocks placed by them in general

1 messages · Page 1 of 1 (latest)

lyric cave
#

This is what i have made so far

    if player is not op:
        if {bypass::%player%} is false:
            "%region at player%" contains "box":
                add event-block to {blocks::*}

on break:
    loop {blocks::*}:
        if event-block is {blocks::*}:
            uncancel event
        else:
            cancel event
            send "You cannot break that here"```
silk gulch
#

just set {placed::%location of eveny-block%} to player's uuid

#

then on break you can check it when they break the block

silk gulch
#

and you are comparing a single block to the whole list in line 9

lyric cave
#

so

#
    if player is not op:
        if {bypass::%player%} is false:
            "%region at player%" contains "box":
                add event-block to {placed::%location of every-block%} to player's uuid

on break:
    if {placed::%location of event-block%} is player's uuid:
            uncancel event
        else:
            cancel event
            send "You cannot break that here"```
#

@silk gulch

clear spruce
#

where did you come up with every-block from?

#

also with what eren suggested you dont have to loop the list

silk gulch
#

dont add it set it

#

and dont loop the list

#

you only need to check if {placed::%location of event-block%} is player's uuid

lyric cave
#

ohh

clear spruce
#

Nope
You are still adding to the list