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); } 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -