Solved On Block Place

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

Daisy

Member
Sep 16, 2020
3
0
1
19
Hey guys! I'm a relatively new skripter, and I'm not sure on how to "discriminate" which blocks get placed.
(I'm trying to make a generator plugin, and I've gotten everything else worked out) I've tried adding an NBT tag and even trying to change MetaData; (to no avail) Heres the code I've been using:

Code:
on place of furnace:
     if event-block has custom nbt tag "gen": #I've also tried normal just "nbt tag "gen""
            #code
     else:
            #extra code
I've tried even using metadata, but nothin seems to work.
I have SkBee installed, and I can't assign a nbt tag to items (I'll work that out)
(I've checked the docs)
 
Last edited:
if i understood it correctly you could just do something like
Code:
options:
    Nameofitem:&7&l(&6Generator&7&l)  #the name of the generator while in item form




command /getgen: #to get the gen
    trigger:
        give 1 furnace named "@{Nameofitem}" to player





on place of furnace:
    if player's tool is a furnace named "@{Nameofitem}":
        #Code it's a gen

    else:
        #Code its not a Gen
 
if i understood it correctly you could just do something like
Code:
options:
    Nameofitem:&7&l(&6Generator&7&l)  #the name of the generator while in item form




command /getgen: #to get the gen
    trigger:
        give 1 furnace named "@{Nameofitem}" to player





on place of furnace:
    if player's tool is a furnace named "@{Nameofitem}":
        #Code it's a gen

    else:
        #Code its not a Gen
YES! Thank you so much! This works really well. (I didn't realize I could do the "if player's tool" thing to items like that!)
This works amazing!
 
Status
Not open for further replies.