EntityReborn / CHVirtualChests

A virtual chest implementation extension for CommandHelper.
MIT License
0 stars 5 forks source link

update_virtualchest() doesn't directly update the opened GUI menu #20

Open macjuul opened 8 years ago

macjuul commented 8 years ago

I know this function is meant to update the chest cache, however it'd be neat to update the chest for all viewers as well. This allows for some fancy item tooltip "animations". I made an edit on my side and added the following piece of code to update_virtualchest()

for(MCHumanEntity p : inv.getViewers()) { Bukkit.getPlayer(p.getName()).updateInventory(); }

It could also be possible to put this in it's own function, however putting it in update_virtualchest() seems better to me

EDIT: Nevermind, 1.9 kind of screwed this up :/