Solved On break block genered naturally or placed players

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

VOIDDER

Member
Aug 23, 2018
27
0
1
33
Help, I ran out of ideas on how to implement this...
How to check if the block that the player broke was placed by the player or appeared naturally?

on break:
if event-block is coal ore:
(and how to check, I don't know, help me plz)
 
This is the only solution I can come up with

Code:
on place:
   add location of event-block to {playerblocks::*}

on break:
    if {playerblocks::*} contains location of event-block:
        send "block placed by player"
    else:
        send "block not placed by player"
    remove location of event-block from {playerblocks::*}

command /removeplayerblocks [<text>]:
    trigger:
        loop {playerblocks::*}:
            set block at loop-value to air
        send "All blocks placed by players got removed"
Not tested, not sure if it works
 
Is there a possibility without recording? In the minecraft itself, is there no information whether this block was put or was generated. core protect takes data from somewhere...
 
Status
Not open for further replies.