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.

Solved Break certain blocks inside region

Discussion in 'Skript' started by kamilleon, Dec 30, 2019.

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

    kamilleon Member

    Joined:
    Nov 18, 2017
    Messages:
    48
    Likes Received:
    0
    I'm trying to make an ore regen skript, but the ores would be inside a protected region.

    Theres two possible ways to do this, but for both I can't figure it out

    a, Get the x y z coordinates of the block, and make it to a string, then save it as a region, and allow the block break flag but worldguard doesn't accept it, since sometimes it contains a "-" and also "."

    b, Somehow make use worldguard api to "skip" over that block

    Any suggestions?
     
  2. IDuckz_

    IDuckz_ Active Member

    Joined:
    Jul 25, 2019
    Messages:
    106
    Likes Received:
    2
    Remove that protected region, and put this code in:
    Code (Text):
    1. on block break:
    2.     if event-block is not any ore:
    3.         if player does not have permission "<Put your permission here, the permission would be to bypass this event and able to break>":
    4.             cancel event
    5.             send "<message here for breaking block>"
    This will make it so that they can't break anything but ores.
     
  3. kamilleon

    kamilleon Member

    Joined:
    Nov 18, 2017
    Messages:
    48
    Likes Received:
    0
    Well, thanks for helping but I already made one which works when you wrote that.
     
  4. IDuckz_

    IDuckz_ Active Member

    Joined:
    Jul 25, 2019
    Messages:
    106
    Likes Received:
    2
    Alright, make sure you mark this as solved.
     
    • Agree Agree x 2
Thread Status:
Not open for further replies.

Share This Page

Loading...