Solved Adding Item To Player Inventory And Its Invisible?

Discussion in 'Plugin Development' started by 16austin16, Jun 18, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    16austin16

    I Have Done This Before And For Some Reason When I Am Doing It In The PlayerInteractEvent It Is Invisible Until You Interact With The Slot It Is In
     
  2. Offline

    TehCoderHD

    It's because in the PlayerInteractEvent it only adds the item when you interact with the item slot.
     
  3. Offline

    Drkmaster83

    Try updating the inventory?
     
  4. Offline

    Reynergodoy

    p.updateInventory();

    it will automatically update the inventory for you :)
     
  5. You booth don't know what you're talking about or is it just me who didn't understood the meaning of what you are doing? Because PlayerInteractEvent is for BLOCKS (actions are LEFT_CLICK_AIR, LEFT_CLICK_BLOCK, RIGHT_CLICK_AIR, RIGHT_CLICK_BLOCK and PHYSICAL)
    The right event is InventoryClickEvent
     
    Last edited: Jun 20, 2015
  6. Offline

    Drkmaster83

    Rather than throwing possibly rude remarks around, please just politely suggest your recommendation and continue on your merry way...

    There's a few ways to interpret this thread and what the OP wants. What I interpreted is that when the PlayerInteractEvent is called, he's adding an item into the inventory of the player, and the item is invisible. Updating the inventory after the item is added would most likely fix this problem.
     
  7. Offline

    16austin16

    That Worked Thanks. :)
     
Thread Status:
Not open for further replies.

Share This Page