Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by Bladian, Aug 9, 2015.
Title says it all.
I cant' seem to find the method to do it.
Have you tried simply reopening the Inventory provided in the InventroyCloseEvent?
Use event InventoryCloseEvent ?
and cancel it ?
You cant. InventoryCloseEvent doesnt implement cancellable. Also, i belive closing an inventory is partally clientside so you cant cancel it.
on InventoryCloseEvent wait 1 tick (start syncDelayedTask), and reopen closed inventory.
Exactly what Mr. sipsy said.
You can't cancel the InventoryCloseEvent as it's client side, the event is just the client notifying the server that the inventory is being closed. As others have said, you would have to let it close then reopen it a tick or two later.