How to disable a ton of certain blocks from breaking?

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

KingDooms

Member
Jun 10, 2020
26
0
1
So i'm trying to make it so when you "try" to break a block you don't have the tool for, it doesn't work, in this case it will be wood and when i mean wood i mean literally every single wood type, and there's over a hundred of em'. So how do I make it? This is what i've tried.


Code:
command /blockcheck [<text>] [<text>]:
    permission: op
    trigger:
        if arg-1 is "check":
            send "%{AllWoodTypes::*}%" to player
            stop
        if arg-1 is "delete":
            clear {AllWoodTypes::*}
            stop
        if arg-1 is "what":
            send "%type of target block%" to player
            stop
        else:
            add type of target block to {AllWoodTypes::*}
            send "&f&lDone" to player

on block break:
    if player's gamemode is not creative:
#        if event-block is oak log or spruce log or birch log or jungle log or acacia log or dark oak log:
        if event-block is {AllWoodTypes::*}:
            if player's tool is not wooden axe or stone axe or golden axe or iron axe or diamond axe or netherite axe:
                send action bar "&4&lYou need a stronger tool to break this block!" to player
                cancel event
 
Status
Not open for further replies.