cClientHandle::SendConfirmPosition()
#1
It seems like cClientHandle::SendConfirmPosition() is not referenced anywhere in MCServer which causes the plugin hook HOOK_PLAYER_JOIN never to be called.

Should SendConfirmPosition() still be used or should it be removed?
Reply
Thanks given by:
#2
It should be used in the 1.2.5 protocol, isn't it? If not, does the protocol work?
Reply
Thanks given by:
#3
Protocol 1.2.5 is not using this function either (at least not directly)
It is used by cClientHandle::CheckIfWorldDownloaded() but it doesn't reach that part of the code when connecting with a 1.3.x client, I can't say about 1.2.5

The main issue with this is that HOOK_PLAYER_JOIN is never called like this. Should the hook be moved somewhere else?
Reply
Thanks given by:
#4
Is the hook needed at all? What is the difference between PLAYER_JOIN and PLAYER_LOGIN? Is there a situation where PLAYER_LOGIN cannot be used in place of PLAYER_JOIN?
Reply
Thanks given by:
#5
PLAYER_LOGIN is called before the player is actually spawned in the world, it allows you to do things like whitelisting/banning, changing player names and perhaps invisibly joining the server.

PLAYER_JOIN is called after the player has been spawned. Use this for the MOTD, to give player inventory items or teleport the player somewhere.

The MOTD can probably also be done in PLAYER_LOGIN (if the protocol allows this), but the rest requires different hooks
Reply
Thanks given by:
#6
Well can we access the Player:SetName() in player_login ?
Reply
Thanks given by:
#7
Yes you can, but the player has then already been loaded (position, inventory, permissions etc.)
Reply
Thanks given by:
#8
Okay then, move the PLAYER_JOIN hook to the cClientHandle function that actually spawns the player Smile

Sorry, I don't have the source here with me, so my answers are kinda vague Wink
Reply
Thanks given by:
#9
Alright I move some hooks around
Reply
Thanks given by:
#10
Seems reasonable. Now UPDATE THE WIKI!Big Grin
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)