Skip to content

Commit 78fb8e2

Browse files
committed
update for new api
1 parent b21bcde commit 78fb8e2

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

plugin.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public class ConsoleData : IData {
1414
public string DownloadPath { get { return _DownloadPath; } set { _DownloadPath = value; } }
1515
public static string _Version;
1616
public string Version { get { return _Version; } set { _Version = value; } }
17+
public static string _CurrentWorkingPath;
18+
public string CurrentWorkingPath { get { return _CurrentWorkingPath; } set { _CurrentWorkingPath = value; } }
1719
}
1820

1921
public class ExternalScripts : IPlugin {
@@ -28,13 +30,13 @@ public class ExternalScripts : IPlugin {
2830

2931
public void PluginInit() {
3032
_data = new ConsoleData();
31-
3233
_Commands = new List<ICommand>();
34+
}
35+
36+
public void RegisterCommands() {
3337
_Commands.Add(new ListScripts());
3438
_Commands.Add(new Exec());
35-
}
36-
37-
public void PluginMain() {
39+
3840
if (!Directory.Exists(Path.Join(_data.SavePath, "share", "scripts"))) {
3941
Console.WriteLine("error: scripts folder does not exist!");
4042
return;
@@ -43,6 +45,9 @@ public void PluginMain() {
4345
_Commands.Add(new Script(Path.GetFileName(s)));
4446
}
4547
}
48+
49+
public void PluginMain() {
50+
}
4651

4752
public void PluginShutdown() {
4853
}

0 commit comments

Comments
 (0)