Cuberite stopped calling HOOK_PLAYER_JOINED
#1
I have a bit of code, which up to today has always worked fine. It uses the hook HOOK_PLAYER_JOINED to run a bit of code every time a player joins.
However, after updating Cuberite today (note, I haven't updated Cuberite for more then 2 weeks before this), this hook doesn't seem to be called anymore. Even if only run a simple "LOG('test');", it doesn't get executed.
The strange thing is, that it does run this hook if I reload the server (not restart) with a player connected.

Has anything in this hook changed, or would this be a bug? Using a self compiled Cuberite, commit b268db4, Linux. Connected clients are 1.10, but it doesn't seem to matter what version they connect with.
Reply
Thanks given by:
#2
There shouldn't be any change to that.
Reply
Thanks given by:
#3
Perhaps another plugin is aborting the hook?
Reply
Thanks given by:
#4
Seems like it. I was testing some things in a different plugin, which indeed also uses that hook. I did not realize one plugin using it would block the other.
Both do nothing special, and they both return true once the function is finished.
Is this intentional? It seems like a bug to me.
Reply
Thanks given by:
#5
Returning true from a hook means that Cuberite will not call any other registered handler for that hook. You need to return false (or nothing) in order to continue the chain.
Reply
Thanks given by:
#6
Aah, missed that in the documentation then. Thanks!
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)