Solved How to check if a block has a name?

  • Thread starter Deleted member 5655
  • Start date
  • 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 community!

    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.
Do you mean it's actual name or a custom one given? If it's a placed block you cannot check for a custom name, it loses it on place.
you can check the actual item name in different events such as clicking with expressions such as "target-block" or "event-block"
 
I want it to do something like this:

On place of iron ore:
If block does not have name "iron ore gen"
Cancel event
 
Since it's at that point a held item before placing, you have to refer to it as an item or a tool(item in hand of player at that moment).
you have the right idea, just the wrong syntax. And there are various ways to do the same thing in this case
So something like
if name of player's tool is not "iron ore gen":
 
Problem sloved!
Since it's at that point a held item before placing, you have to refer to it as an item or a tool(item in hand of player at that moment).
you have the right idea, just the wrong syntax. And there are various ways to do the same thing in this case
So something like
if name of player's tool is not "iron ore gen":
 
Status
Not open for further replies.