summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/Hooks/OnPlayerSpawned.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/OnPlayerSpawned.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 '')
-rw-r--r--MCServer/Plugins/APIDump/Hooks/OnPlayerSpawned.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/MCServer/Plugins/APIDump/Hooks/OnPlayerSpawned.lua b/MCServer/Plugins/APIDump/Hooks/OnPlayerSpawned.lua
new file mode 100644
index 000000000..190909ee5
--- /dev/null
+++ b/MCServer/Plugins/APIDump/Hooks/OnPlayerSpawned.lua
@@ -0,0 +1,32 @@
+return
+{
+ 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
+}
+
+
+
+
+