Plugin command not parsing arguments with [] at the end

Hi there!

It's been a while since I don't make a plugin command. But I believe they are not recognizing an array @type.
Like: @type string[], @type argType[] etc...

It seems to me that they are always returning a string, instead of an array. But that approach still works as plugin parameters, but not as a plugin command argument.

Tested with 4 different types: string, multiline_string, note, text

My core files version are 1.2.1
My editor version is 1.2.1

Here is a small sample project replicating the issue(around 4M😎.
Talk to the event and press F12 to see the console log.
Download
Plugin command arguments, like plugin parameters, are all strings. You can parse them into arrays as usual, e.g.
Spoiler: plugin example
JavaScript:
// myPlugin.js //
/*:
 * @target MZ
 * @plugindesc plugin command argument parsing example
 * @command log
 * @arg messages
 * @type string[]
 * @default []
 */
const myCommand = function(args) {
    const arr = JSON.parse(args.messages || '[]');  // string to array
    if (Array.isArray(arr) && arr.length) {
        SceneManager.showDevTools();
        console.log(...arr);
    }
};
PluginManager.registerCommand('myPlugin', 'log', myCommand);
Plugin command arguments, like plugin parameters, are all strings. You can parse them into arrays as usual, e.g.
Spoiler: plugin example
JavaScript:
// myPlugin.js //[/INDENT]
[INDENT]/*:[/INDENT]
[INDENT]* @target MZ[/INDENT]
[INDENT]* @plugindesc plugin command argument parsing example[/INDENT]
[INDENT]* @command log[/INDENT]
[INDENT]* @arg messages[/INDENT]
[INDENT]* @type string[][/INDENT]
[INDENT]* @default [][/INDENT]
[INDENT]*/[/INDENT]
[INDENT]const myCommand = function(args) {[/INDENT]
[INDENT]    const arr = JSON.parse(args.messages || '[]');  // string to array[/INDENT]
[INDENT]    if (Array.isArray(arr) && arr.length) {[/INDENT]
[INDENT]        SceneManager.showDevTools();[/INDENT]
[INDENT]        console.log(...arr);[/INDENT]
[INDENT]    }[/INDENT]
[INDENT]};[/INDENT]
[INDENT]PluginManager.registerCommand('myPlugin', 'log', myCommand);
Hi!

Oh, GOd... xD
Guess I was too tired =/

I'm so used to that my plugin parameters are automatically parsed by my core plugin, that I totally forgot that I didn't apply the auto parse function in the plugin commands args too.

That was indeed the problem, I applied the parse and now it works. hahaha Shame on me xD

Thanks @caethyril !!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/plugin-command-not-parsing-arguments-with-at-the-end.135826/