Solved On Block Break - Advanced

  • 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.
Oct 6, 2020
3
0
1
17
Hey :emoji_grinning:
I am making an Prison-System for my SkyPvP server and I want the System to add 1 to {mine.block.stone.%player%}, my idea was:

on block break:
loop blocks in radius 1 of event-block: #In Case of Explosion-Enchantment
if loop-block is stone:
add loop-block to {mine.inv.stone.%player%}
 
I hope this works.
Code:
on block break:
    loop blocks in radius 1 of event-block: #Loop blocks
        if loop-block is stone: #Check if block is stone
            set loop-block to air #set loop-block to air
            add 1 to {mine.inv.stone.%player%} #add 1 to Player's stone inventory
 
Status
Not open for further replies.