Vault

Vault

7M Downloads

ItemInfo for potions

craftycreeper opened this issue ยท 2 comments

commented

I was writing a plugin that makes use of Vault for economy and item info support. I ran into a bit of an issue when I discovered that Items.itemByStack() returns null when given a potion. It also appears to return null when itemByID() is given 373, the ID for the potion/glass bottle item.

Is there any chance that the ItemInfo for potions could be added? All of the sub-IDs are available on the Minecraft wiki. Heck, if you want I'll even do this myself and submit a pull request. :) It'd be really handy to hand Items.itemByStack() a potion item and get back the name of the potion!

commented

there isn't a good way for me to support these at the moment. If you want to write a pull request for their names I'd be willing to implement it, but potions are just so Screwed up at the moment, there are like 65k possibilities or something so I opted to not touch them yet.

commented

Ah. I was only proposing to mess with the ones that are actually obtainable at the moment, listed here: http://www.minecraftwiki.net/wiki/Potions#Potions

I'll look into this tomorrow.