protected internal override void OnPurchase(Player p, string args) { if (args.Length == 0) { OnStoreCommand(p); return; } string color = Matcher.FindColor(p, args); if (color == null) { return; } string name = Colors.Name(color); if (!CheckPrice(p)) { return; } if (color == p.color) { p.Message("&WYour color is already " + color + name); return; } if (!PlayerOperations.SetColor(p, p.name, name)) { return; } Economy.MakePurchase(p, Price, "%3Color: " + color + name); }
protected override void SetPlayerData(Player p, string target, string colName) { PlayerOperations.SetColor(p, target, colName); }