cClientHandle::SendConfirmPosition() - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html) +--- Forum: Development (https://forum.cuberite.org/forum-13.html) +--- Thread: cClientHandle::SendConfirmPosition() (/thread-586.html) Pages:
1
2
|
cClientHandle::SendConfirmPosition() - FakeTruth - 10-16-2012 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? RE: cClientHandle::SendConfirmPosition() - xoft - 10-16-2012 It should be used in the 1.2.5 protocol, isn't it? If not, does the protocol work? RE: cClientHandle::SendConfirmPosition() - FakeTruth - 10-16-2012 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? RE: cClientHandle::SendConfirmPosition() - xoft - 10-16-2012 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? RE: cClientHandle::SendConfirmPosition() - FakeTruth - 10-16-2012 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 RE: cClientHandle::SendConfirmPosition() - ThuGie - 10-16-2012 Well can we access the Player:SetName() in player_login ? RE: cClientHandle::SendConfirmPosition() - FakeTruth - 10-16-2012 Yes you can, but the player has then already been loaded (position, inventory, permissions etc.) RE: cClientHandle::SendConfirmPosition() - xoft - 10-16-2012 Okay then, move the PLAYER_JOIN hook to the cClientHandle function that actually spawns the player Sorry, I don't have the source here with me, so my answers are kinda vague RE: cClientHandle::SendConfirmPosition() - FakeTruth - 10-17-2012 Alright I move some hooks around RE: cClientHandle::SendConfirmPosition() - xoft - 10-18-2012 Seems reasonable. Now UPDATE THE WIKI! |