public static void LoadAllSettings() { // Unload custom plugins List <Plugin> plugins = new List <Plugin>(Plugin.all); foreach (Plugin p in plugins) { if (Plugin.core.Contains(p)) { continue; } Plugin.Unload(p, false); } ZSGame.Instance.infectMessages = ZSConfig.LoadInfectMessages(); Colors.Load(); Alias.Load(); BlockDefinition.LoadGlobal(); ImagePalette.Load(); SrvProperties.Load(); AuthService.ReloadDefault(); Group.LoadAll(); CommandPerms.Load(); Command.InitAll(); Block.SetBlocks(); AwardsList.Load(); PlayerAwards.Load(); Economy.Load(); WarpList.Global.Filename = "extra/warps.save"; WarpList.Global.Load(); CommandExtraPerms.Load(); ProfanityFilter.Init(); Team.LoadList(); ChatTokens.LoadCustom(); SrvProperties.FixupOldPerms(); CpeExtension.LoadDisabledList(); TextFile announcementsFile = TextFile.Files["Announcements"]; announcementsFile.EnsureExists(); announcements = announcementsFile.GetText(); // Reload custom plugins foreach (Plugin p in plugins) { if (Plugin.core.Contains(p)) { continue; } Plugin.Load(p, false); } OnConfigUpdatedEvent.Call(); }
public static List <CoinBalanceDisplay> ToBalance(this PlayerAwards item, Coins coins) { //TODO not expired etc return(item.Where(e => coins.Any(c => c.EntityRefId.Equals(e.CoinRefId))).GroupBy(f => f.CoinRefId).Select(cl => new CoinBalanceDisplay { Coin = coins.FirstOrDefault(g => g.EntityRefId.Equals(cl.First().CoinRefId))?.ToDisplay(), Balance = cl.Sum(s => s.Value), } ).ToList()); }
public static void MiscLine(Player p, string name, int deaths, int money) { if (Economy.Enabled) { p.Message(" &a{0} &cdeaths&S, &a{2} &S{3}, &f{1} &Sawards", deaths, PlayerAwards.Summarise(name), money, Server.Config.Currency); } else { p.Message(" &a{0} &cdeaths&S, &f{1} &Sawards", deaths, PlayerAwards.Summarise(name)); } }