I need help by the InventoryTransactionEvent

Discussion in 'Nukkit discussions and help' started by LucGamesHD, 20/7/16.

  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
We welcome you on our site. This site is devoted to the Nukkit project and all that is connected with him. Here you can communicate, download plugins, also many other things get acquainted! Register the account right now :3
  1. LucGamesHD

    LucGamesHD Developer

    Messages:
    26
    Likes Received:
    10
    Minecraft:
    LucGamesYT
    How can I define the player when InventoryTransactionEvent ?
     
  2. fromgate

    fromgate Administrator

    Messages:
    675
    Likes Received:
    191
    I think you must use getTransaction() method. Transaction contains Inventory object and you you can find viewers of the inventory using method getViewers.
     
  3. LucGamesHD

    LucGamesHD Developer

    Messages:
    26
    Likes Received:
    10
    Minecraft:
    LucGamesYT
    Player p = (Player) e.getTransaction().getInventories()
    getViewers is not Aviable :/
     
  4. fromgate

    fromgate Administrator

    Messages:
    675
    Likes Received:
    191
    getInventories() returns collection of inventories.
    You must iterate through these inventories (probably :)).
     
  5. LucGamesHD

    LucGamesHD Developer

    Messages:
    26
    Likes Received:
    10
    Minecraft:
    LucGamesYT
    Ahhh Nice Thx! :)
    Its work! ^^
     
    fromgate likes this.

Share This Page