This is not correct. You say that you want infinite 'chests'. You need to get the contents of the chest, then return the item clicked by the player while the event is cancelled. However, your code does work, just not with chests.

Ambamore2000
You cannot expect others to code for you ... The answer was given to you several times. I'm sorry to be rude, but you cannot just blindly copy and paste code, say it does not work, and expect someone else to spoonfeed you the answer.

In your other recent posts, you mention not having a complete understanding of Java. I would strongly advise you to stop where you are and learn the fundamentals of java first.

Like suggested before, either make a plugin request or take a look at TheNewBoston's YouTube bukkit coding tutorials asking people to do it for you and saying here's what I have (onEnable & disable) is kind of insulting :3

Gater12
No, it's fixed. I typed it wrong before (InventoryClikEvent) and then now typed it correctly, and imported it.

--When you say, "Listen for InventoryClickEvent. If it's from a special inventory, get the clicked item, cancel the event, and add the clicked item to the player's inventory."
I don't get the part from "If it's from a special inventory" thru the end.

Ambamore2000 Check something about the inventory that would guarantees it is the inventory you want it to be (I.E. Give the inventory a unique name, then check for that name), "special inventory" is just referring to the inventory that you want to have infinite of the item

CeramicTitan Eh, I can pseudo-code the Free sign
Player clicks sign->check if it is free sign->get block from sign->create inventory with max stack of item in everyslot->profit

Click to expand...

The infinite chest plugin is actually quite easy in heinsight.
Listen to PlayerInteractEvent, check If the right clicked block is a chest, create a fake inventory and set that inventory to the chests inventory