lishid / OpenInv

Open anyone's inventory as a chest, real-time!
GNU General Public License v3.0
120 stars 97 forks source link

Major update of the code #3

Closed Belphemur closed 12 years ago

Belphemur commented 12 years ago

Hi,

As said in the message, here are ALL the fixes and optimization I applied in AdminCmd.

Most important ones are correction of the bug when opening an Offline Inventory, changing it and the player connect.

Also corrected in the other sense, opening inventory of a connected player and he disconnect.

Using a cache of the chest to avoid creation of other chest each time the command is called, permit to have more then 1 user on the same "chest".

Using the new Bukkit API : onClose() method.

lishid commented 12 years ago

Thanks for the update, I manually merged it in and will close this pull request. Though there is a tiny problem with the code you provided (openinv an online player, player goes offline, edit inventory, player comes back online with old inventory). This was fixed as I merged the code.

Belphemur commented 12 years ago

Thanks for the bug report :) I'll correct that on my code too.