In the game files there is a commons.jar file open it with WinZip or WinRar or something similar and inside it you will find a database called definitions.db
In that database are all the IDs you are looking for. Note that to give a player Items you need to use the insertNewItem(short itemID, int variation, int stacksize) method but of objects you need to use insertNewObjectItem(short objectID, int variation, int stacksize) and similarly for clothing insertNewClothingItem(short clothingID, int variation, int color1, int color2, int color3) all these methods can be found under the Inventory object.
Thanks I have working code on the giving and taking from inventory but my list of objects was greatly restricted.. Thanks Minos. I found it. Holy Blarney Castle! Hope this would not be write exploitable in game.
People would be surprised to find that Cows could attack X/