Prevent Block Behind The Item Frame from Breaking

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

EvilSlayer

Member
Dec 23, 2020
21
1
3
21
How can I prevent the block behind the item frame from breaking.
Because If players break block behind item frame, itemframe is dropping.
 
Not tested, but should work.

Code:
on break:
 loop all blocks in radius 1 around event-block:
  if loop-block is item frame:
   cancel event
 
Not tested, but should work.

Code:
on break:
 loop all blocks in radius 1 around event-block:
  if loop-block is item frame:
   cancel event
Thanks but not working. Do nothing - Doesnt give error.
Code:
on break of purpur block:
    loop all blocks in radius 1 around event-blocks:
        if loop-block is item frame:
            cancel event
 
Thanks but not working. Do nothing - Doesnt give error.
Code:
on break of purpur block:
    loop all blocks in radius 1 around event-blocks:
        if loop-block is item frame:
            cancel event

Do you have TusKe? If yes, then remove that plugin and add skript-gui then your code should perfectly work now.
 
Do you have TusKe? If yes, then remove that plugin and add skript-gui then your code should perfectly work now.
I dont use tuske and I dont need skript gui. Why I need skript gui?
[doublepost=1644786646,1644527526][/doublepost]Somebody can help me pls?
 
item frame is not the block its a entity
i tested this it working fine

Code:
on break:
    loop all entities in radius 1 of event-block:
        if loop-entity is item frame:
            send "&cThere is item frame there break it first!" to player
            cancel event