devblook / akropolis

A modern Minecraft server hub core solution. Based on DeluxeHub by ItsLewizz.
GNU General Public License v3.0
28 stars 9 forks source link

Can't specify port number when using the pinger PAPI extension. #21

Closed GrimPlayzs closed 1 month ago

GrimPlayzs commented 1 month ago

Describe the bug

This is related to my last report, but I figured out what could be going wrong I will do my best to explain.

So I use the pinger PAPI extension to get the status of servers on the network like online players and whether the server is online or not. The placeholder needed to do this is as follows:

pinger_online_127.0.0.1:port_number pinger_players_127.0.0.1:port_number

What I think the problem is that since you need to put papi: before the actual placeholder so in the config the whole string looks like this: It seems ignores the port number meaning it won't get the information from that server on that port it will instead use the current server's port number meaning it will display that info for every placeholder.

Link to latest.log file

No errors were logged

Steps to reproduce

Install PAPI on 1.21.1 Install the Pinger PAPI extension Use multiple "pinger_online_127.0.0.1:port_number" placeholder Notice how it only displays the info for the server you are on.

Expected behavior

I expected the placeholders to update accordantly.

Technical information

Paper 1.21.1 Akroplis 1.6.0

Additional context

No response

GrimPlayzs commented 1 month ago

I would also like to mention that I did not experience this issue when using deluxehub.

Fritx22 commented 1 month ago

As part of the modernization of the plugin, Akropolis uses MiniMessage format for the placeholders. In this case, the tag to parse PlaceholderAPI placeholders is named papi and it requires an argument, which is separated from the tag name and other arguments (in this case none) by the colon. The MiniMessage documentation linked above explains that you can include special characters like the colon or tag open characters in the arguments itself if you quote the argument contents. For example, you can use:

If you include the placeholder in a quoted text you have to use the other quote type or escape it to avoid the syntax problems. For example, here are two ways to add it to a quoted scoreboard line:

I look forward to your reply, please confirm if the issue can be closed now.

GrimPlayzs commented 1 month ago

I will try this now.

GrimPlayzs commented 1 month ago

Can confirm adding quotations does work. Thank you for the explanation.