Skip to content
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

PlaceholderAPI and working with arguments #376

Open
DormantCat opened this issue Jan 15, 2024 · 0 comments
Open

PlaceholderAPI and working with arguments #376

DormantCat opened this issue Jan 15, 2024 · 0 comments
Assignees
Labels
module:spigot Related to Spigot/PaperMC type:feature A new functionality
Milestone

Comments

@DormantCat
Copy link

Describe the Feature

A copy of my message from Discord.

I have a question. And why not actually add the ability for arguments to work in the Placeholder API (example: %triton_message_with_arguments:<arg1><arg2>%) ? or in any other way? Even in the official documentation of the placeholder api, there are many examples of using substitutes with several variables, including placeholders.

make a structure:
%triton_ is the required part
message_with_arguments - this is the message key
: - this is the separator, then what will the arguments go on
<arg> - where <> is the selection (input and output) of the argument.
if necessary, insert a placeholder
For example <{placeholder}>
% - completion

at the output we get: %triton_key:<arg><{placeholder}><arg_2>%

In my head, the logic is simple. (in fact, everything is much more complicated)

1 - there is a request for a substitute
2 - a message is received by key (depending on the language)
3 - message output

the situation is similar with the placeholder api
, but it's a little more difficult to do
3 - split keys by the character :
4 - replacement of variables in the message (2), with the argument in {} get placeholder
5 message output

the logic of the work is very similar to [args][arg]some argument[/arg][/args]

@DormantCat DormantCat added triage Hasn't been manually reviewed type:feature A new functionality labels Jan 15, 2024
@diogotcorreia diogotcorreia added module:spigot Related to Spigot/PaperMC and removed triage Hasn't been manually reviewed labels Jan 15, 2024
@diogotcorreia diogotcorreia added this to the 4.0.0 milestone Jan 15, 2024
@diogotcorreia diogotcorreia modified the milestones: 4.0.0, 4.1.0 Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:spigot Related to Spigot/PaperMC type:feature A new functionality
Projects
Status: No status
Development

No branches or pull requests

2 participants