Open real player inventory ?

Discussion in 'Plugin Development' started by Aykeos, Oct 4, 2015.

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

    Aykeos

    Hello, i have a question.

    Is it possible to open this inventory with a event ?[​IMG]
     
  2. @Aykeos No idea if it will work but try this
    e.getPlayer().openInventory(e.getPlayer().getInventory());
     
  3. Offline

    tkuiyeager1

    @Aykeos I dont know if it will work but i think it will:
    Code:
    Player p = e.getPlayer();
    Inventory playerinventory = Bukkit.createInventory(null, InventoryType.PLAYER, "Player Invnetory");
            p.openInventory(playerinventory);
     
  4. Offline

    teej107

    Of course it'll work :p

    If the OP was talking about a separate inventory, I would try @tkuiyeager1's suggestion.
     
  5. Offline

    Aykeos

    Thanks, i have other question how to denied the player to use the "E" key ?
     
  6. Offline

    teej107

    You can't. It's all client side.
     
  7. Offline

    TheDevZone

    Take a look at the PlayerCloseInventory. There u can cancel that he/she closes the inventory.
     
Thread Status:
Not open for further replies.

Share This Page