-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add arguments support in [openmenu]
actions
#36
Conversation
There are still 3 things to figure out before this PR can be merged:
|
I find that it complicates the logic unnecessarily and that it is not very practical or even understandable. The person only needs to put {arg} to retrieve them and can put them in the action, which is much more visual. Like that: |
Which part is complicated exactly? Can you be a bit more specific? |
[openmenu] actions
[openmenu]
actions
To recover part of the arguments if they have the same name, On the configuration side it's not very clear how it works like that. |
I'm sorry but I am a bit lost. Can you tell me about which bullet point from my comment are you talking about specifically? Or are you talking about the entire PR? |
Keeping part of the arguments, not replacing them if they have the same name, ... I find that it's not very clear and for example if I want to replace the player_name, how do I do it? I would have simply overwritten the arguments with the new ones, I find it more understandable |
But this is how my PR currently works. I think I have to give another example because it is pretty hard to explain. There are 2 menus:
You open menu A using
If you do it the first way, you will have the following arguments in menu B: We need to keep the first option because this is how DeluxeMenus has worked for a long time and changing it would break old menus. Also, you can always do |
Yes no worries about that, what I found unclear is what happens when you do |
For bullet point 3 and your response, I feel the best way would be to just require all arguments and avoid confusion. As itsme-to said, I would just have the player use If there are no arguments supplied, then carry over. |
# Conflicts: # src/main/java/com/extendedclip/deluxemenus/action/ClickActionTask.java
Hello, it's still missing register argument without command to really have utility to this, like made here #33 It's allow to have menu that cannot been open by player and have the information (args) controled. |
And I still find that this implementation is unnecessarily complicated and not at all clear when reading the configuration. |
I have raised an issue to allow arguments for menus that have no
While arguments being passed from one menu to another might confuse things a bit, it is how menus have worked before this change so we'll keep it for backwards compatibility. Here is the best way I was able to simplify arguments: Arguments can be passed to menus when opening them with commands like so: |
This PR adds support for arguments to the
[openmenu]
and[openguimenu]
actions.How it works:
- '[openmenu] menu1 arg1 arg2'
Closes #30
EDIT: Should be merged after #46