parent
42a505e18f
commit
015cf61b77
3 changed files with 83 additions and 0 deletions
|
|
@ -37,6 +37,16 @@ namespace TShockAPI.Hooks
|
|||
public string Password { get; set; }
|
||||
}
|
||||
|
||||
public class PlayerLogoutEventArgs
|
||||
{
|
||||
public TSPlayer Player { get; set; }
|
||||
|
||||
public PlayerLogoutEventArgs(TSPlayer player)
|
||||
{
|
||||
Player = player;
|
||||
}
|
||||
}
|
||||
|
||||
public class PlayerCommandEventArgs : HandledEventArgs
|
||||
{
|
||||
public TSPlayer Player { get; set; }
|
||||
|
|
@ -62,6 +72,9 @@ namespace TShockAPI.Hooks
|
|||
public delegate void PlayerPreLoginD(PlayerPreLoginEventArgs e);
|
||||
public static event PlayerPreLoginD PlayerPreLogin;
|
||||
|
||||
public delegate void PlayerLogoutD(PlayerLogoutEventArgs e);
|
||||
public static event PlayerLogoutD PlayerLogout;
|
||||
|
||||
public delegate void PlayerCommandD(PlayerCommandEventArgs e);
|
||||
public static event PlayerCommandD PlayerCommand;
|
||||
|
||||
|
|
@ -108,6 +121,15 @@ namespace TShockAPI.Hooks
|
|||
return args.Handled;
|
||||
}
|
||||
|
||||
public static void OnPlayerLogout(TSPlayer ply)
|
||||
{
|
||||
if (PlayerLogout == null)
|
||||
return;
|
||||
|
||||
var args = new PlayerLogoutEventArgs(ply);
|
||||
PlayerLogout(args);
|
||||
}
|
||||
|
||||
public static void OnPlayerChat(TSPlayer ply, string rawtext, ref string tshockText)
|
||||
{
|
||||
if (PlayerChat == null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue