summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/Hooks/OnLogin.lua
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-11-23 21:26:24 +0100
committermadmaxoft <github@xoft.cz>2013-11-23 21:27:02 +0100
commitd9dc241e6fe669585d7c0b13d55818a22e1c76bc (patch)
tree0eed0d711eb4ff851e43f84bf6cb8f7cf3435cde /MCServer/Plugins/APIDump/Hooks/OnLogin.lua
parentDocumented sqlite functions. Used: http://lua.sqlite.org/index.cgi/doc/tip/doc/lsqlite3.wiki#sqlite3_functions (diff)
downloadcuberite-d9dc241e6fe669585d7c0b13d55818a22e1c76bc.tar
cuberite-d9dc241e6fe669585d7c0b13d55818a22e1c76bc.tar.gz
cuberite-d9dc241e6fe669585d7c0b13d55818a22e1c76bc.tar.bz2
cuberite-d9dc241e6fe669585d7c0b13d55818a22e1c76bc.tar.lz
cuberite-d9dc241e6fe669585d7c0b13d55818a22e1c76bc.tar.xz
cuberite-d9dc241e6fe669585d7c0b13d55818a22e1c76bc.tar.zst
cuberite-d9dc241e6fe669585d7c0b13d55818a22e1c76bc.zip
Diffstat (limited to 'MCServer/Plugins/APIDump/Hooks/OnLogin.lua')
-rw-r--r--MCServer/Plugins/APIDump/Hooks/OnLogin.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/MCServer/Plugins/APIDump/Hooks/OnLogin.lua b/MCServer/Plugins/APIDump/Hooks/OnLogin.lua
new file mode 100644
index 000000000..6859f9d11
--- /dev/null
+++ b/MCServer/Plugins/APIDump/Hooks/OnLogin.lua
@@ -0,0 +1,31 @@
+return
+{
+ HOOK_LOGIN =
+ {
+ CalledWhen = "Right before 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
+}
+
+
+
+