Jikoo / OpenInv

Open anyone's inventory as a chest, real-time!
GNU General Public License v3.0
118 stars 37 forks source link

Inventory Modify Event #156

Closed creatorfromhell closed 11 months ago

creatorfromhell commented 1 year ago

Reason

There really should be an inventory that is called when an inventory has been closed from the /openinv command with write access. This would allow other plugins that utilize offline player inventories to correctly adapt accordingly.

Jikoo commented 1 year ago

Sorry about the slow reply, pretty swamped lately.

Definitely something we can slip in here: https://github.com/Jikoo/OpenInv/blob/922586c92532ccfcda41c974fd8bbf10607b0f8c/plugin/src/main/java/com/lishid/openinv/OpenInv.java#L583

This made me think of the old issue with "I want OI to open X SQL inventory save plugin's data" but the save event actually would be irrelevant for that case because if OI lets them load their own Player, they can just override their loaded player's save method.

creatorfromhell commented 1 year ago

Sorry about the slow reply, pretty swamped lately.

Definitely something we can slip in here:

https://github.com/Jikoo/OpenInv/blob/922586c92532ccfcda41c974fd8bbf10607b0f8c/plugin/src/main/java/com/lishid/openinv/OpenInv.java#L583

This made me think of the old issue with "I want OI to open X SQL inventory save plugin's data" but the save event actually would be irrelevant for that case because if OI lets them load their own Player, they can just override their loaded player's save method.

👍 Just let me know when this gets implemented.