Pick / Inventory events not implemented?

  • I understand this is a busy moment, still I have to raise these points.


    As far as I can tell, neither the PlayerPickupItemEvent or the PlayerInventoryAddEvent do fire, at least not for the actions I would them expect to. Picking a plant up (tomatoes, broccoli, etc.) or an object laying on the ground does not fire either event.



    Is this intended?



    As an aside, may I expect the events which where present in the LUA binding (related to vegetation, construction objects, chests, etc.) to be added to the Java API too?

  • Yeah, this event it's cancellable unfortunately. In Lua, door access was restricted by cancelling the "PlayerObjectStatusChange" event, however, this event does not exist in the plugin API yet.
    Making the object interactions cancellable is a little bit tricky... this requires the server to confirm every player-object interaction (even accessing a workbench or sitting down on a chair). I'm afraid that this may have a negative impact on the responsiveness of the gui (e.g. accessing a workbench in multiplayer, especially when having a high ping)... I will do some tests, maybe the lag wouldn't be so bad at all, so eventually the interaction event becomes cancellable in the future :)

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!