mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Fix command registration for external MCC scripts
- Update Roslyn compiler LanguageVersion from CSharp9 to Latest - Implement ChatBotCommand.RegisterCommand() (was empty) - Add RegisterChatBotCommand() helper to ChatBot base class - Add automatic command cleanup in BotUnLoad via UnregisterChatBotCommands() - Fix external scripts using Handler.dispatcher (CS0176 static via instance) - Fix AutoTree.cs wrong Initialize/OnUnload signatures (CS0115) - EntityCount.cs RegisterChatBotCommand() now works with new helper Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com> Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/27fc44b8-50d8-4194-8057-019a29675d4a
This commit is contained in:
parent
34bc6c5400
commit
687d1746ed
7 changed files with 62 additions and 15 deletions
|
|
@ -49,7 +49,7 @@ namespace MinecraftClient.Scripting.DynamicRun.Builder
|
|||
private static CSharpCompilation GenerateCode(string sourceCode, string fileName, List<string> additionalAssemblies)
|
||||
{
|
||||
var codeString = SourceText.From(sourceCode);
|
||||
var options = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.CSharp9);
|
||||
var options = CSharpParseOptions.Default.WithLanguageVersion(LanguageVersion.Latest);
|
||||
|
||||
var parsedSyntaxTree = SyntaxFactory.ParseSyntaxTree(codeString, options);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue