Need help with block sides

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

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

ElgerElg

New Member
Mar 18, 2022
8
0
1
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.
 
Using Skript-Reflect, you can get the side of the block someone is facing at.

Here is a way to check (example only):
Code:
import:
    org.bukkit.block.BlockFace


on right click on purpur stairs:
    set {_b} to event.getBlock()
    if {_b}.getRelative(BlockFace.NORTH).getType() is Material.SIGN:
        open chest with 3 rows named "&6&lPurPur Menu" to player
 
Using Skript-Reflect, you can get the side of the block someone is facing at.

Here is a way to check (example only):
Code:
import:
    org.bukkit.block.BlockFace


on right click on purpur stairs:
    set {_b} to event.getBlock()
    if {_b}.getRelative(BlockFace.NORTH).getType() is Material.SIGN:
        open chest with 3 rows named "&6&lPurPur Menu" to player

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.
[doublepost=1647719453,1647718583][/doublepost]
Using Skript-Reflect, you can get the side of the block someone is facing at.

Here is a way to check (example only):
Code:
import:
    org.bukkit.block.BlockFace


on right click on purpur stairs:
    set {_b} to event.getBlock()
    if {_b}.getRelative(BlockFace.NORTH).getType() is Material.SIGN:
        open chest with 3 rows named "&6&lPurPur Menu" to player

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
 
Last edited:
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.
[doublepost=1647719453,1647718583][/doublepost]

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)

View attachment 6749
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.
 
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.
 
Status
Not open for further replies.