[SOLVED] Closing player inventory!

Discussion in 'Plugin Development' started by NeatMonster, Sep 26, 2011.

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

    NeatMonster

    Hello,

    For my plugin SpoutBackpack, I need to close the player inventory. Previously, I was using this code:
    Code:
    player.getHandle().y();
    but it's no longer working (method name change I think). If somebody knows the new method name, please answer to this thread. I also tried this code:
    Code:
    ((SpoutPlayer) event.getPlayer()).closeActiveWindow();
    but it doesn't work too (@Afforess).

    Thanks in advance, NeatMonster.
     
  2. Offline

    nisovin

    Looks like Spout is calling EntityHuman.x().
     
  3. Offline

    NeatMonster

    Will try it but if it doesn't work with Spout, it shouldn't work when called manually.
     
  4. Offline

    nisovin

    How about EntityPlayer.closeInventory() ?
     
  5. Offline

    NeatMonster

    Will try it too (I can't test it now because I'm on my phone).

    Thank you for you help.
     
  6. Offline

    Afforess

    It's been fixed in Spout development builds. 1.0.7 release soon.
     
    NeatMonster and ZNickq like this.
  7. Offline

    NeatMonster

    Okay, thank you!
     
  8. Offline

    NeatMonster

Thread Status:
Not open for further replies.

Share This Page