mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
[skip ci] Miscellaneous scripting QoL improvements and fixes (#2740)
* Update CI to detect the word "skipci" * Make script compilation errors more verbose Rather than just giving the line in which the error has been found, return the actual text content of the line itself * Attempt to bubble up errors in the script chain, so it says the reason for any NotRun errors. The exception message gets eaten up when the script is running, and an exception happens. Also put in a default result message for the CmdResult, instead of having it default to null. * Trim the whitespace off returned script compilation error line
This commit is contained in:
parent
4919db8820
commit
8756ff5b3c
3 changed files with 11 additions and 7 deletions
|
|
@ -22,7 +22,7 @@ namespace MinecraftClient.CommandHandler
|
|||
public CmdResult()
|
||||
{
|
||||
this.status = Status.NotRun;
|
||||
this.result = null;
|
||||
this.result = "Command did not run, cannot determine the result of the command.";
|
||||
}
|
||||
|
||||
public Status status;
|
||||
|
|
@ -35,7 +35,7 @@ namespace MinecraftClient.CommandHandler
|
|||
this.result = status switch
|
||||
{
|
||||
#pragma warning disable format // @formatter:off
|
||||
Status.NotRun => null,
|
||||
Status.NotRun => "Command did not run, cannot determine the result of the command.",
|
||||
Status.FailChunkNotLoad => null,
|
||||
Status.FailNeedEntity => Translations.extra_entity_required,
|
||||
Status.FailNeedInventory => Translations.extra_inventory_required,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue