PlayerRemoveVegetationEvent does something even if cancelled

  • Scenario:


    1) a player attempts to remove a vegetation specimen (say, a group of flowers, but I suspect the actual type is irrelevant)


    2) a PlayerRemoveVegetationEvent is generated


    3) let's assume a plug-in cancels the event


    4) result: the group of flowers is not collected and remains visible in place and the cursor on it turns into a hand


    So far so good. However, if the player attempts to remove it again, no event is generated, as if the vegetation be no longer there.


    It remains so, until the player moves away enough for the chunk to be unloaded. When the player comes back there and attempts to collect the flowers again, the cycle resumes as above.


    Summary: it seems as when this event is cancelled, the target object is not completely removed and remains visible, but it is anyway removed from some internal data structure.


    Perhaps this applies to other world modifying events too?

  • I noticed that already, I thought that it should be like that, saving memorey. But it could also be that then only the event is collected ^^

    Sorry, I do not understand your point: this is not a memory saving, it is an inconsistency between what is shown to the player and the internal data. Then, it should NOT be like that.

  • Actually the plant is not removed from the internal data structure (if this was true, the plant would be missing after reloading the world). Instead there is a clientside flag which prevents the player from picking up the plant multiple times. The intention was to prevent the client from "spamming" the server with "pickup packets" in case the server reacts slowly (caused by high ping, high server load etc).
    Unfortunately this flag does not take the API event into account, so even if you cancel the event, the flag is still there and prevents the client from picking up the plant.


    This issue will be fixed with the next update :)

Participate now!

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