Skip to content

pass args with dm open command - #259

Open
FakEEE14 wants to merge 4 commits into
HelpChat:mainfrom
FakEEE14:main4
Open

pass args with dm open command#259
FakEEE14 wants to merge 4 commits into
HelpChat:mainfrom
FakEEE14:main4

Conversation

@FakEEE14

@FakEEE14 FakEEE14 commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

added arguments to /dm open command so you can pass arguments for that player
like this:
/dm open punish_menu target -p:me arg1 arg2 arg3 ...
or
/dm open punish_menu target arg1 arg2 arg3 -p:me ...

@FakEEE14

FakEEE14 commented Oct 6, 2025

Copy link
Copy Markdown
Contributor Author

Hello @BlitzOffline , as you said i break down each change into its own PR, this one need to be accepted because default value is on top of this

@FakEEE14

Copy link
Copy Markdown
Contributor Author

hello @BlitzOffline , what you think ?

@FakEEE14

Copy link
Copy Markdown
Contributor Author

hi @BlitzOffline , any news ?

@FakEEE14 FakEEE14 closed this May 1, 2026
@FakEEE14
FakEEE14 deleted the main4 branch May 1, 2026 06:04
@FakEEE14
FakEEE14 restored the main4 branch May 7, 2026 05:07
@FakEEE14 FakEEE14 reopened this May 7, 2026
@BlitzOffline

Copy link
Copy Markdown
Member

Hi. I will take a look at this by the end of the week.

Comment thread src/main/java/com/extendedclip/deluxemenus/command/subcommand/OpenCommand.java Outdated
this should respect command schema
@FakEEE14

Copy link
Copy Markdown
Contributor Author

what you think about this @BlitzOffline

@BlitzOffline

Copy link
Copy Markdown
Member

Hi. There's still a problem with this. the command can't tell the difference between a <viewer> name and the first [args] value. It just always assumes the parameter is the <viewer> parameter.

So this breaks /dm open <menu> myArg. This used to just open the menu for yourself. Now it tries to treat myArg as a player name, fails to find them online, and errors out.

Also, if an arg happens to start with -p:, it gets mistaken for the placeholder flag instead of being passed as an arg.

My suggestion would be that we add a clear marker before [args] starts, like -args:. Once the parser sees that, it stops guessing and just takes everything after it as args. This keeps the old commands working exactly as before:

/dm open <menu> [-args: <args>]
/dm open <menu> -p:<target> [-args: <args>]
/dm open <menu> <viewer> [-args: <args>]
/dm open <menu> <viewer> -p:<target> [-args: <args>]

@FakEEE14

Copy link
Copy Markdown
Contributor Author

dats a bettr idea. im on it

@FakEEE14

FakEEE14 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

this should do it @BlitzOffline , what you think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants