PlayerEx

PlayerEx

5M Downloads

[Feature Request] Add placeholders for Box of Placeholders addon

elhertz opened this issue · 9 comments

commented

Box of Placeholders - PlaceholderAPI
It'd be nice to have some quick info on the tablist or scoreboard -- and maybe a placeholder to get info from other users? that way you could create a player top-list on the scoreboard using normal placeholders and nested placeholders:

  • %playerex_level_top_1% = %playerex_level{playerex_level_top_1}%
  • %playerex_level_top_2% = %playerex_level{playerex_level_top_2}%
  • %playerex_level_top_3% = %playerex_level{playerex_level_top_3}%
  • etc

(StyledScoreboards is still in dev afaik but you could do this using StyledPlayerList)

commented

So I got the chance to finally open my server and after some requests from my friends I wanted to give a couple suggestions;

  • First, to show the all time top players instead of the players that are currently connected.
  • Add a placeholder to show the level of player in a specific top position. For that I think %playerex:level_top/x% should be renamed to %playerex:name_top/x% and you should create a %playerex:level_top/x% placeholder to show the player's level.
    Example:
    %playerex:name_top/1% = Hertz
    %playerex:level_top/1% = 100

Thank you. I love your mod, 0 bugs so far!

commented

Hi there,
These are some good suggestions, I think I can implement them without too much trouble.

Just so that I understand correctly, you want %playerex:name_top/x% and %playerex:level_top/x% to include offline players in addition to currently connected ones?
Thanks.

commented

Just so that I understand correctly, you want %playerex:name_top/x% and %playerex:level_top/x% to include offline players in addition to currently connected ones?

Yes, exactly. I hope that's possible. Thanks!

commented

Hi there,
I'm wholly unfamiliar with this, but if you give me some time I can look into it and get back to you. Or if I'm taking too long, feel free to make a pull request.
Thanks.

commented

Just following up,
I've been playing around with Placeholders a bit, but I don't know how to make a scoreboard using any of the placeholders, nor do I know what exactly is required to do so. What I can do is create commands that interpret my custom placeholders, such as:

/playerex string <placeholder>

Similar/equivalent to the default /boxofplaceholders string <placeholder>

Could you specify how you'd go about creating your scoreboard so I could replicate that and use it for testing?
Otherwise I'll admit I'm a little lost, this is unfamiliar to me still and I can only invest so much time learning new things.
Thanks.

commented

Thank you for taking my request in consideration!
Currently you can use the placeholders on StyledPlayerList and StyledChat
I recommend you joining the discord of the owner of Box of Placeholders

This is my current config on StyledPlayerList

{
  "CONFIG_VERSION_DONT_TOUCH_THIS": 1,
  "_comment": "Before changing anything, see https://github.com/Patbox/StyledPlayerList#configuration",
  "defaultStyle": "default",
  "updateRate": 20,
  "switchMessage": "Tu TAB ha sido cambiado a: <gold>${style}</gold>",
  "unknownStyleMessage": "<red>Ese estilo no existe!</red>",
  "permissionMessage": "<red>No tienes permisos!</red>",
  "changePlayerName": true,
  "playerNameFormat": " %luckperms:prefix% %player:displayname% <color:#D12222>%player:health%❤</color>",
  "updatePlayerNameEveryChatMessage": false,
  "playerNameUpdateRate": 20,
  "permissionNameFormat": []
}

It looks like this:
It looks like this
(don't mind the null thingy, i'm just testing placeholders)

But if you add PlayerEx placeholders support it would look like this:
But if you add PlayerEx placeholders support it would look like this

This would be the config:

{
  "CONFIG_VERSION_DONT_TOUCH_THIS": 1,
  "_comment": "Before changing anything, see https://github.com/Patbox/StyledPlayerList#configuration",
  "defaultStyle": "default",
  "updateRate": 20,
  "switchMessage": "Tu TAB ha sido cambiado a: <gold>${style}</gold>",
  "unknownStyleMessage": "<red>Ese estilo no existe!</red>",
  "permissionMessage": "<red>No tienes permisos!</red>",
  "changePlayerName": true,
  "playerNameFormat": " %luckperms:prefix% Lvl%playerex:level% %player:displayname% <color:#D12222>%player:health%❤</color>",
  "updatePlayerNameEveryChatMessage": false,
  "playerNameUpdateRate": 20,
  "permissionNameFormat": []
}

That's an example, but you can do the same with StyledChat and all of patbox's plugins. Feels like we are in bukkit, right? it's amazing.
Also it would be nice to have placeholders to get info from other players so when the StyledScoreboard gets released you can make a level top from playerex, how cool would that be? (you could make something like that adding lines to the tab too, but the scoreboard is nicer for things like that)

This is an example of what you can do with placeholders and StyledPlayerlist:
This is an example of what you can do with placeholders and StyledPlayerlist
(img is not mine, someone shared it on patbox's discord)

Edit:
Forgot to add the style of my tab. It's inside config/styledplayerlist/styles/default.json

{
  "id": "default",
  "name": "Default",
  "header": [
    "",
    "  <bold><gradient:#B400FF:#00A4FF>Hercios Modpack Server</gradient> <r>⛏  ",
    "",
    "<color:#555555><strikethrough>            </strikethrough>[ </color><color:#00FFB2>%server:online%<color:#6666676>/</color>%server:max_players%</color><color:#555555> ]<strikethrough>            </strikethrough></color>",
    ""
  ],
  "footer": [
    "",
    "<color:#555555><strikethrough>                                  </strikethrough></color>",
    "",
    "<gray>TPS: %server:tps_colored% <dark_gray>|</dark_gray> <gray>Ping: %player:ping_colored% <dark_gray>|</dark_gray> <gray>MSPT: %server:mspt_colored%",
  ],
  "hidden": false,
  "permission": ""

You can keep adding lines. I don't actually know the limit.

commented

This is great, I really appreciate you taking the time to write out such a detailed comment. I'll continue working on it.
Thanks.

commented

I've added some placeholders and a page for them on the wiki. Feel free to suggest more that I can add in the future.

commented

Wow you're amazing! I'll request for your mod to be added to the list (if that's alright with you)
Thanks!