Solved Break certain blocks inside region

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

kamilleon

Member
Nov 18, 2017
48
0
6
24
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?
 
Remove that protected region, and put this code in:
Code:
on block break:
    if event-block is not any ore:
        if player does not have permission "<Put your permission here, the permission would be to bypass this event and able to break>":
            cancel event
            send "<message here for breaking block>"

This will make it so that they can't break anything but ores.
 
Remove that protected region, and put this code in:
Code:
on block break:
    if event-block is not any ore:
        if player does not have permission "<Put your permission here, the permission would be to bypass this event and able to break>":
            cancel event
            send "<message here for breaking block>"

This will make it so that they can't break anything but ores.
Well, thanks for helping but I already made one which works when you wrote that.
 
Status
Not open for further replies.