java - How do I open my own inventory via a Event? -
i trying open inventory whenever pick item. in bukkit.
here event far, arguments player.openinventory
empty.
@eventhandler public void blank(playerdropitemevent e){ player player = e.getplayer(); player.openinventory(); }
try using player.getinventory()
retrieve inventory using player.openinventory(inventory)
open it.
@eventhandler public void blank(playerdropitemevent e) { player player = e.getplayer(); inventory inventory = player.getinventory(); player.openinventory(inventory); }