Arguments in title and material
Closed this issue · 4 comments
Please change the order of replacing placeholders and arguments in the menu title and item material.
I want to change the menu title using a placeholder depending on the parameters passed. Now, as I understand it, the replacement order is as follows:
%placeholder_{argument}% -> first the placeholder is accessed, then {argument} is replaced.
Arguments in the material field also do not work.
Hello. I am assuming you are using one of the latest development builds from Jenkins. In these builds we've changed the order in which placeholders and arguments are parsed for security reasons. If you are willing to accept these security issues, you can revert this change by simply adding this option inside your menu (it is a per menu option): parse_placeholders_after_arguments: true
.
You can read more on the reasons this change was made there: #99.
You can also read more on the change here: #78
For arguments inside materials, I am not able to replicate so please provide some more information. I would love to just see your full menu if possible.
I mean:
args:
- material
items:
'test':
material: {material}
I thought 100 times "do I really need this?" and realized that I don't. But another question arose. There is a parameter "close_commands" that executes a command when closing with an item, but is it possible to execute a command when closing the menu with a button Esc?
I mean:
args: - material items: 'test': material: {material}
I thought 100 times "do I really need this?" and realized that I don't. But another question arose. There is a parameter "close_commands" that executes a command when closing with an item, but is it possible to execute a command when closing the menu with a button Esc?
Not at the moment. When clip added them, he didn't want servers to be able to force players inside menus. If a player isn't able to close the menu, they'd have to completely restart the game. We are currently rethinking that idea and might allow this in the future.
Not at the moment. When clip added them, he didn't want servers to be able to force players inside menus. If a player isn't able to close the menu, they'd have to completely restart the game. We are currently rethinking that idea and might allow this in the future.
I think the ease of use of the server, including the menu, is the job of the administrator. If the player has to close the game, he will simply never return to the server)) Thanks for the detailed answer.