closeInventory() not actually closing?

The weird thing here is that I’m not even recieving an error for this.

I understand that you need to supply a cause for this method, however there’s no real documentation on WHAT to place in there, or how to build the Cause. What I’ve used is:


However despite giving no errors in the console, the inventory doesn’t close either.

Well, what are you trying to close an inventory on. Sometimes you need your plugin to be the root of the cause btw.

I’m literally just trying to close a custom inventory which was opened to the player previously.

It seems that neither a player object OR plugin object actually work :confused:

Well, I’ve used closeInventory before several times. Make sure your on a recent version of sponge.

I am indeed on a recent version of sponge, it’s odd that if you were to give it a blank Cause, it will definitely notify you of that, yet does nothing when I actually supply one.

Very odd

Never a plugin object, usually a PluginContainer.

How to code this game

1 Like

There’s quite extensive documentation.

I’m having the same issue - I suspect something broke in a recent Sponge version.

It’s working in build 192, sponge vanilla.

I’m on SpongeForge #2020. Also having issues with setting item quantity and lore, not sure if that’s related though.

Well, that’s odd. I haven’t had that issue. Try redownloading sponge?

Here’s our conundrum - the implementation is still broken in stable-5. I’ve asked in IRC whether this commit can be back-merged.