internal EcoEconomyAccount(IIdentity player, IEconomyCurrency currency) { if (player == null || !(player is EcoPlayer ecoPlayer) && !(player is EcoPlayerUser)) { throw new ArgumentException("Must be of type \"EcoPlayer\".", nameof(player)); } Owner = player; Currency = currency; }
public bool CanExchange(IEconomyCurrency currency) { throw new NotSupportedException(); }
public decimal ExchangeTo(decimal amount, IEconomyCurrency targetCurrency) { throw new NotSupportedException(); }
public decimal Exchange(double amount, IEconomyCurrency targetCurrency) => throw new NotSupportedException("Vanilla currencies may not exchange with each-other.");
public bool CanExchange(IEconomyCurrency currency) => false;
public decimal ExchangeTo(decimal amount, IEconomyCurrency targetCurrency) => throw new NotImplementedException();
public Task <bool> CreateAccountAsync(IUser owner, string name, IEconomyCurrency currency, out IEconomyAccount account) { throw new NotImplementedException(); }
public bool CreateAccount(IIdentity owner, string name, IEconomyCurrency currency, out IEconomyAccount account) => throw new NotSupportedException("You may not create vanilla accounts.");