1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Prevent Block Behind The Item Frame from Breaking

Discussion in 'Requests' started by EvilSlayer, Jan 30, 2022.

  1. EvilSlayer

    EvilSlayer Member

    Joined:
    Dec 23, 2020
    Messages:
    21
    Likes Received:
    1
    How can I prevent the block behind the item frame from breaking.
    Because If players break block behind item frame, itemframe is dropping.
     
  2. mordrowned

    mordrowned Member

    Joined:
    Apr 22, 2021
    Messages:
    40
    Likes Received:
    2
    Not tested, but should work.

    Code (Text):
    1. on break:
    2.  loop all blocks in radius 1 around event-block:
    3.   if loop-block is item frame:
    4.    cancel event
     
  3. EvilSlayer

    EvilSlayer Member

    Joined:
    Dec 23, 2020
    Messages:
    21
    Likes Received:
    1
    Thanks but not working. Do nothing - Doesnt give error.
    Code (Text):
    1. on break of purpur block:
    2.     loop all blocks in radius 1 around event-blocks:
    3.         if loop-block is item frame:
    4.             cancel event    
     
  4. sleepy unk

    sleepy unk Member

    Joined:
    Feb 8, 2022
    Messages:
    25
    Likes Received:
    0
    Do you have TusKe? If yes, then remove that plugin and add skript-gui then your code should perfectly work now.
     
  5. EvilSlayer

    EvilSlayer Member

    Joined:
    Dec 23, 2020
    Messages:
    21
    Likes Received:
    1
    I dont use tuske and I dont need skript gui. Why I need skript gui?
    --- Double Post Merged, Feb 13, 2022, Original Post Date: Feb 10, 2022 ---
    Somebody can help me pls?
     
  6. Trickered

    Trickered New Member

    Joined:
    Feb 1, 2022
    Messages:
    6
    Likes Received:
    0
    item frame is not the block its a entity
    i tested this it working fine

    Code (Text):
    1. on break:
    2.     loop all entities in radius 1 of event-block:
    3.         if loop-entity is item frame:
    4.             send "&cThere is item frame there break it first!" to player
    5.             cancel event
     

Share This Page

Loading...