Beispiel #1
0
 private void PlayerHooks_PlayerLogout(TShockAPI.Hooks.PlayerLogoutEventArgs e)
 {
     /// This should never be true. But I haven't tested.
     if (!e.Player.IsLoggedIn)
     {
         CleanInventory(e.Player);
     }
 }
Beispiel #2
0
 private void OnPlayerLogout(TShockAPI.Hooks.PlayerLogoutEventArgs args)
 {
     if (TShock.Config.RememberLeavePos && args.Player.Dead)
     {
         try
         {
             TShock.DB.Query("DELETE FROM RememberedPos WHERE Name=@0 AND WorldID=@1;", args.Player.Name, Main.worldID.ToString());
         }
         catch (Exception ex)
         {
             TShock.Log.Error(ex.ToString());
         }
     }
 }