internal static void TryLoad(BasePlayer player) { if (Find(player) != null) { return; } PlayerData data = Interface.Oxide.DataFileSystem.ReadObject <PlayerData>($"KDRGui/{player.userID}"); if (data == null || data.id == 0) { data = new PlayerData { id = player.userID, name = player.displayName }; } else { data.Update(player); } data.Save(); LoadedPlayerData.Add(data); }
internal static void TryLoad(ulong playerId) { if (Find(playerId) != null) { return; } PlayerData data = Interface.Oxide.DataFileSystem.ReadObject <PlayerData>($"KDRGui/{playerId}"); if (data != null) { LoadedPlayerData.Add(data); } }