Solved Does getInventory counts current item on cursor?

Discussion in 'Plugin Development' started by JoltTheBolt, Mar 25, 2022.

?

Does getInventory counts current item on cursor?

  1. Yes

    0 vote(s)
    0.0%
  2. No

    1 vote(s)
    25.0%
  3. Try it yourself, you lazy-!

    3 vote(s)
    75.0%
Thread Status:
Not open for further replies.
  1. Offline

    JoltTheBolt

    So if my inventory has, for example, 1 diamond in it. If I open the inventory and click the diamond. Now it is on my cursor. If I getInventory at that exact time, will that inventory show that I have diamond?

    So, if I click on another item(Let's say 'Button') in an inventory. I want it to work if I have the item in inventory and I just click on the Button OR if I click on the 'Button' with the item on my cursor. I could use getCursor maybe if the answer to my question (in the title) is "No". Otherwise, I have nothing to worry about, I can simply check if my inventory has item and make the button work.
     
  2. Offline

    Strahan

    No. It doesn't count as being in your inventory until you drop it into one of your inv slots.

    Though the time it took you to write this post, you could've tested it lol.
     
  3. Offline

    JoltTheBolt

    I think about plugins all the time and how I will tackle some problems that I have been having recently. I could not access my pc at the time I was thinking this so I asked it here. Anyway, thanks for the reply!
    Solved.
     
    Strahan likes this.
Thread Status:
Not open for further replies.

Share This Page