#What on earth is PlayerEvents.inventoryChanged doing?

3 messages · Page 1 of 1 (latest)

ashen grove
#

Im hoping to test myself by limiting inventory space.
I figured i can limit changes done to non hotbar slots. Buuut.....this event is insanely weird.

First when picking up an item, it fires. This is good.
Throwing a item? No fire....huh, a change to inventory undetected.

Opening the inventory and clicking a item...strangely enough no fire as well? I suppose it's the mouse holding it, but it still feel changed.
But when you put that item back in the same slot...THEN it changes. Even tho no real change was made so it makes above seem weird.

And the most breaking of it all. Since we can click and hold an item in the inventory, we can just drag it out the inventory to drop it.
SOMEHOW, this doesnt fire the method.

Whats going on here XD
I want a 'any' change and this isnt reliable? I can toss out my entire inventory and not fire the method.

velvet stirrupBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

ashen grove
#

code is just a tell:

PlayerEvents.inventoryChanged(event => {
    event.server.tell("Changed!")
})