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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

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

Need help with block sides

Discussion in 'Skript' started by ElgerElg, Mar 18, 2022.

Thread Status:
Not open for further replies.
  1. ElgerElg

    ElgerElg Member

    Joined:
    Mar 18, 2022
    Messages:
    3
    Likes Received:
    0
    Hello! I need help with side blocks. Explain how I did: I wrote a script

    on right click on purpur stairs:
    open chest with 3 rows named "&6&lPurPur Menu" to player

    and after that I started to try it, but it turned out that the menu opens on one side, instead of 4.
    I would be glad for any of your help, since I could not solve this problem for a long time.
     
  2. ryanrox333

    ryanrox333 Member

    Joined:
    Jul 6, 2019
    Messages:
    17
    Likes Received:
    0
    Using Skript-Reflect, you can get the side of the block someone is facing at.

    Here is a way to check (example only):
    Code (Text):
    1. import:
    2.     org.bukkit.block.BlockFace
    3.  
    4.  
    5. on right click on purpur stairs:
    6.     set {_b} to event.getBlock()
    7.     if {_b}.getRelative(BlockFace.NORTH).getType() is Material.SIGN:
    8.         open chest with 3 rows named "&6&lPurPur Menu" to player
     
  3. ElgerElg

    ElgerElg Member

    Joined:
    Mar 18, 2022
    Messages:
    3
    Likes Received:
    0
    Do you need an addon for this? To clarify: I do not need a check, but the use of any sides of the purpur block.
    --- Double Post Merged, Mar 19, 2022, Original Post Date: Mar 19, 2022 ---
    I installed the addon and your script, but it doesn't work. Maybe it works, but it's not what I need. In addition, it sends this message to the console (See screenshot)

    upload_2022-3-19_21-49-1.png
     
    #3 ElgerElg, Mar 19, 2022
    Last edited: Mar 19, 2022
  4. ryanrox333

    ryanrox333 Member

    Joined:
    Jul 6, 2019
    Messages:
    17
    Likes Received:
    0
    I was using 1.18.2 with the latest version of skript and skript-reflect, can possibly be an older version where the class is different.
     
  5. ElgerElg

    ElgerElg Member

    Joined:
    Mar 18, 2022
    Messages:
    3
    Likes Received:
    0
    So, can you do something? I need this function, without a face, but the main thing is that the menu opens. Also if that I have version 1.12.2
    I can't use a normal block because I have a json model attached to the stairs that should rotate. But I think there is a way out of this situation, just few people know it.
     
Thread Status:
Not open for further replies.

Share This Page

Loading...