using System;
using System.Collections.Generic;
using System.Text;
using ReallifeGamemode.Server.Core.API;
using ReallifeGamemode.Server.Core.Commands.User;
using ReallifeGamemode.Server.Core.Extensions;
using ReallifeGamemode.Server.Types;

namespace ReallifeGamemode.Server.Core.Commands.Admin
{
  abstract class AdminCommand : UserCommand
  {
    protected abstract AdminLevel AdminLevel { get; }

    public override bool CanExecute(IPlayer player)
    {
      return base.CanExecute(player) && player.IsAdmin(AdminLevel, GetDbContext());
    }
  }
}
