summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/APIDesc.lua
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-14 21:46:25 +0200
committermadmaxoft <github@xoft.cz>2013-10-14 21:46:25 +0200
commit862397856d4f42861b9b8bb4560e907310ce6fd8 (patch)
tree644fbb3d60dfcbe954c3dd114684531600a1730b /MCServer/Plugins/APIDump/APIDesc.lua
parentAPIDump: Documented HOOK_KILLING. (diff)
downloadcuberite-862397856d4f42861b9b8bb4560e907310ce6fd8.tar
cuberite-862397856d4f42861b9b8bb4560e907310ce6fd8.tar.gz
cuberite-862397856d4f42861b9b8bb4560e907310ce6fd8.tar.bz2
cuberite-862397856d4f42861b9b8bb4560e907310ce6fd8.tar.lz
cuberite-862397856d4f42861b9b8bb4560e907310ce6fd8.tar.xz
cuberite-862397856d4f42861b9b8bb4560e907310ce6fd8.tar.zst
cuberite-862397856d4f42861b9b8bb4560e907310ce6fd8.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/APIDump/APIDesc.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/MCServer/Plugins/APIDump/APIDesc.lua b/MCServer/Plugins/APIDump/APIDesc.lua
index 4ea95b4da..3c9ee9421 100644
--- a/MCServer/Plugins/APIDump/APIDesc.lua
+++ b/MCServer/Plugins/APIDump/APIDesc.lua
@@ -2586,6 +2586,31 @@ end;
]],
}, -- HOOK_KILLING
+ HOOK_LOGIN =
+ {
+ CalledWhen = "Right after player authentication. If auth is disabled, right after the player sends their name.",
+ DefaultFnName = "OnLogin", -- also used as pagename
+ Desc = [[
+ This hook is called whenever a client logs in. It is called right before the client's name is sent
+ to be authenticated. Plugins may refuse the client from accessing the server. Note that when this
+ callback is called, the {{cPlayer}} object for this client doesn't exist yet - the client has no
+ representation in any world. To process new players when their world is known, use a later callback,
+ such as {{OnPlayerJoined|HOOK_PLAYER_JOINED}} or {{OnPlayerSpawned|HOOK_PLAYER_SPAWNED}}.
+ ]],
+ Params =
+ {
+ { Name = "Client", Type = "{{cClientHandle}}", Notes = "The client handle representing the connection" },
+ { Name = "ProtocolVersion", Type = "number", Notes = "Versio of the protocol that the client is talking" },
+ { Name = "UserName", Type = "string", Notes = "The name that the client has presented for authentication. This name will be given to the {{cPlayer}} object when it is created for this client." },
+ },
+ Returns = [[
+ If the function returns true, no other plugins are called for this event and the client is kicked.
+ If the function returns false or no value, MCServer calls other plugins' callbacks and finally
+ sends an authentication request for the client's username to the auth server. If the auth server
+ is disabled in the server settings, the player object is immediately created.
+ ]],
+ }, -- HOOK_LOGIN
+
}, -- Hooks[]