Skip to content

add papi support#6

Open
TheDiVaZo wants to merge 6 commits into
TechnicJelle:mainfrom
MineLore:main
Open

add papi support#6
TheDiVaZo wants to merge 6 commits into
TechnicJelle:mainfrom
MineLore:main

Conversation

@TheDiVaZo

Copy link
Copy Markdown

Added PAPI dependency to pom, implemented string processing using PAPI

@TheDiVaZo

Copy link
Copy Markdown
Author

#7

@TechnicJelle

TechnicJelle commented Nov 10, 2024

Copy link
Copy Markdown
Owner

Have you tested if this still works on servers without PlaceholderAPI installed?

@TechnicJelle TechnicJelle self-requested a review November 10, 2024 15:59
@TechnicJelle

Copy link
Copy Markdown
Owner

Oh, and could you give a few example config files that I can use to test this locally on my own server?

@TheDiVaZo

Copy link
Copy Markdown
Author

And have you tested if this still works on servers without PlaceholderAPI installed?

I added PAPI to soft dependenses and if PAPI is not present then PAPI related code is not executed

public static String processPAPI(Player player, String str) {
        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null && player != null) {
            return PlaceholderAPI.setPlaceholders(player, str);
        }
        else return str;
    }

@TechnicJelle TechnicJelle linked an issue Nov 10, 2024 that may be closed by this pull request
@TheDiVaZo

Copy link
Copy Markdown
Author

Oh, and could you give a few example config files that I can use to test this locally on my own server?

install papi, install anything papi placeholder processer (example: this) and write config:

url: "https://mc-heads.net/skin/{UUID}.png#%player_displayname%"

Comment thread pom.xml

@TechnicJelle TechnicJelle left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And could you please also mention in the config.yml file that this supports PAPI, and give a few examples there, too?

@TechnicJelle TechnicJelle left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the last code change I'd like to see for now.
I will try it myself later. Hopefully next weekend, but I can't promise anything.

@TheDiVaZo

Copy link
Copy Markdown
Author

This is the last code change I'd like to see for now. I will try it myself later. Hopefully next weekend, but I can't promise anything.

No problem! I'll be waiting, thanks for your time

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.

Add PAPI support to the url field in the config

2 participants