diff options
author | madmaxoft <github@xoft.cz> | 2013-10-18 09:47:21 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-18 09:47:21 +0200 |
commit | 8020cbd3d7add94deacb17af47429f20f76f3a23 (patch) | |
tree | 9a06839b726ce9501bd1cdd21109eb108e1c7071 /MCServer/Plugins/APIDump/APIDesc.lua | |
parent | APIDump: Documented HOOK_PLAYER_TOSSING_ITEM. (diff) | |
download | cuberite-8020cbd3d7add94deacb17af47429f20f76f3a23.tar cuberite-8020cbd3d7add94deacb17af47429f20f76f3a23.tar.gz cuberite-8020cbd3d7add94deacb17af47429f20f76f3a23.tar.bz2 cuberite-8020cbd3d7add94deacb17af47429f20f76f3a23.tar.lz cuberite-8020cbd3d7add94deacb17af47429f20f76f3a23.tar.xz cuberite-8020cbd3d7add94deacb17af47429f20f76f3a23.tar.zst cuberite-8020cbd3d7add94deacb17af47429f20f76f3a23.zip |
Diffstat (limited to '')
-rw-r--r-- | MCServer/Plugins/APIDump/APIDesc.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua index f1f9be275..d8aa77b19 100644 --- a/MCServer/Plugins/APIDump/APIDesc.lua +++ b/MCServer/Plugins/APIDump/APIDesc.lua @@ -2894,6 +2894,31 @@ end; ]], }, -- HOOK_PLAYER_RIGHT_CLICK + HOOK_PLAYER_SPAWNED = + { + CalledWhen = "After a player (re)spawns in the world to which they belong to.", + DefaultFnName = "OnPlayerSpawned", -- also used as pagename + Desc = [[ + This hook is called after a {{cPlayer|player}} has spawned in the world. It is called after + {{OnLogin|HOOK_LOGIN}} and {{OnPlayerJoined|HOOK_PLAYER_JOINED}}, 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 + {{cPlayer}}:Kick() function.</p> + <p> + This hook 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). + ]], + Params = + { + { Name = "Player", Type = "{{cPlayer}}", Notes = "The player who has (re)spawned" }, + }, + Returns = [[ + 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. There is no overridable behavior. + ]], + }, -- HOOK_PLAYER_SPAWNED + HOOK_PLAYER_TOSSING_ITEM = { CalledWhen = "A player is tossing an item. Plugin may override / refuse.", |