Begin script abstraction
This commit is contained in:
24
ReallifeGamemode.Server.Core/Commands/Command.cs
Normal file
24
ReallifeGamemode.Server.Core/Commands/Command.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using ReallifeGamemode.Server.Core.API;
|
||||
using ReallifeGamemode.Server.Log;
|
||||
|
||||
namespace ReallifeGamemode.Server.Core.Commands
|
||||
{
|
||||
public abstract class Command
|
||||
{
|
||||
public abstract bool CanExecute(IPlayer player);
|
||||
|
||||
protected abstract IAPI Api { get; }
|
||||
protected ILogger Log { get; set; }
|
||||
public abstract string CommandName { get; }
|
||||
public virtual string HelpText { get; } = null;
|
||||
|
||||
public Command()
|
||||
{
|
||||
Log = LogManager.GetLogger(this.GetType());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user