2013-11-23 15:26:24 -05:00
|
|
|
return
|
|
|
|
{
|
|
|
|
HOOK_DISCONNECT =
|
|
|
|
{
|
|
|
|
CalledWhen = "A player has explicitly disconnected.",
|
|
|
|
DefaultFnName = "OnDisconnect", -- also used as pagename
|
|
|
|
Desc = [[
|
2014-02-03 16:12:44 -05:00
|
|
|
This hook is called when a client is about to be disconnected from the server, for whatever reason.
|
|
|
|
|
|
|
|
<p><b>Note that this hook will be removed after <1.7 protocol support is removed, as it was originally a hook for
|
|
|
|
the client sending the server a disconnect packet, which no longer happens.</b></p>
|
2013-11-23 15:26:24 -05:00
|
|
|
]],
|
|
|
|
Params =
|
|
|
|
{
|
|
|
|
{ Name = "Player", Type = "{{cPlayer}}", Notes = "The player who has disconnected" },
|
|
|
|
{ Name = "Reason", Type = "string", Notes = "The reason that the client has sent in the disconnect packet" },
|
|
|
|
},
|
|
|
|
Returns = [[
|
2014-02-03 16:12:44 -05:00
|
|
|
If the function returns false or no value, MCServer calls other plugins' callbacks for this event.
|
|
|
|
If the function returns true, no other plugins are called for this event. In either case,
|
2013-11-23 15:26:24 -05:00
|
|
|
the player is disconnected.
|
|
|
|
]],
|
|
|
|
}, -- HOOK_DISCONNECT
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|