#Why does InventoryOpenEvent doesn't fire?
1 messages ยท Page 1 of 1 (latest)
is it registered
yes its part of InventoryInteractListener
I register it at the main class: getServer().getPluginManager().registerEvents(new InventoryInteractListener(this),this);
i dont get what youre doing there? the eventhandler listens for an inventory to open, it does not open one
do you actually want that
I want to detect when a player opens their inventory do disable them being 'afk'
that should fire
are there any console errors
nope
when i open my inventory it should work?
oh wait
I think it only works with other inventories
like a chest
No it should work
for some reason it only fires when I open containers
thats the whole listener class: https://paste.md-5.net/icekuzarer.java
thats the main class: https://paste.md-5.net/oluxoqeyoc.java
inventory open event does not fire fore player inventories
the client never notifies the server about it
ah
only time that really happens is if the player is riding an entity that has an inventory, e.g. a llama or donkey
so I don't have a reason to listen to that event since I already listen to PlayerInteractEvent and that would detect opening containers
stupid game design
spigot should entirely rewrite minecraft
have you seen creative mode xD
oh
an absolute security nightmare
but yea, basically that inventory is fired if any server owned inventory is opened
such as a vehicle inventory
๐
truely
you can listen to the taking inventory achievement but it requires a lot of packet stuff
Wouldnt that only be called once
it gets called every time you open your inventory for some reason