1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved ContainerSetSlotPacket with fake chest

Discussion in 'Development' started by gistrec, Jun 7, 2017.

  1. gistrec

    gistrec Witch

    Messages:
    68
    GitHub:
    gistrec
    Hi all, I would like to create a shop in fake chest
    My steps:
    1) Send "fake chest" to player
    2) Send "ContainerOpenPacket"
    3) Send "ContainerSetContentPacket" with items
    4) I start "tracking" "ContainerSetSlotPacket" from the player
    5) Now I must identify player transaction from chest to player inventory
    6) After purchase, I need send chest inventory again and updated player inventory

    I have a question: how can I identify, when player take from chest and when player place to chest?
    :):):):)
     
  2. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    You can listen for InventoryTransactionEvent.
     
  3. gistrec

    gistrec Witch

    Messages:
    68
    GitHub:
    gistrec
    Tnk for that, but this is not true, because as I use "fake chest" ans send Packet - server will think, that client send error packet :)
    But I think, that I solve it :)
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.