====== OnPlayerSpawned hook callback function ======
OnPlayerSpawned() is called after a player has spawned in the world. It is called after [[api:plugin:onlogin|OnLogin]] and [[api:plugin:onplayerJoined|OnPlayerJoined]], after the player name has been authenticated, the initial worldtime, inventory and health have been sent to the player and the player spawn packet has been broadcast to all players near enough to the player spawn place. This is a notification-only event, plugins wishing to refuse player's entry should kick the player using the [[API:cPlayer|cPlayer]]:Kick() function.
This callback is also called when the player respawns after death (and a respawn packet is received from the client, meaning the player has already clicked the Respawn button).

===== Function signature =====
<code lua>
function OnPlayerSpawned(Player)
</code>
Parameters:
| Player | [[API:cPlayer|cPlayer]] | The player who has spawned |

===== Return values =====
If the function returns false or no value, other plugins' callbacks are called. If the function returns true, no other callbacks are called for this event. Either way the player is let in.

===== Registering the callback =====
To register your plugin to receive a callback through this function, use the hook [[api:plugin:hooks|HOOK_PLAYER_SPAWNED]]
<code lua>
cPluginManager:Get():AddHook(Plugin, cPluginManager.HOOK_PLAYER_SPAWNED);
</code>
