Sponge
Sponge copied to clipboard
InventoryClickEvent - Spectator mode
i'm using SpongeForge version: spongeforge-1.10.2-2477-5.2.0-BETA-2637 and i have a problem with the event InventoryClickEvent when player is in gamemode spectator. the event still not fired like before.
for a while, i have used this event to my moderator's pannel to switch between spectator mode and survival mode. but since my last update (and i needed it) the event doen't work.
If you could repair it, it'll be good for me. thx and i have an other bug to report with this event. (before my last update i had this problem.) when you was in spectator mode, you could get event, but not the clicked item. if you could test it'll be perfect.
thx for your job.
NetHandlerPlayServer#processClickWindow just sends the unmodified inventory back to the client. That is why we have no event that fires. There are no changes.
Not sure how to handle this...
@Faithcaio Can we override that behavior? At minimum I would have expected there still to be a click event, even if nothing changed, if we could detect the click, like, a pre click event of some sort, just so you can catch the interaction for menu's etc. (assuming it's possible, which it sounds like it used to be)
We always fire the inventory events AFTER changes happened. So we would need a new event for this.
Maybe smth. like ClickInventoryEvent.Spectator but not extending ClickInventoryEvent as we cant provide any transactions.
^ API9