add inventory functions, some improvments and fixes

Please everyone check if my change in Static.java with getDurability() and getData() break something. It's needed for potions to get correct ID's. I test it for two weeks and it seems ok but if anyone have idea what it can break, please add comment.