Skip to content

Commit 748c9cd

Browse files
committed
change ModuleVersion to virtual and added a backing field for version
1 parent 38e2953 commit 748c9cd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

managed/CounterStrikeSharp.API/Core/BasePlugin.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public abstract class BasePlugin : IPlugin
4040
{
4141
private bool _disposed;
4242

43+
internal string _version = "<unknown>";
44+
4345
public BasePlugin()
4446
{
4547
RegisterListener<Listeners.OnMapEnd>(() =>
@@ -52,7 +54,7 @@ public BasePlugin()
5254
}
5355

5456
public abstract string ModuleName { get; }
55-
public abstract string ModuleVersion { get; }
57+
public virtual string ModuleVersion { get => _version; }
5658

5759
public virtual string ModuleAuthor { get; }
5860

@@ -650,4 +652,4 @@ protected virtual void Dispose(bool disposing)
650652
_disposed = true;
651653
}
652654
}
653-
}
655+
}

0 commit comments

Comments
 (0)