Wesley1808 / ServerCore

A mod that aims to optimize the minecraft server.
75 stars 11 forks source link

Feature Request: Placeholder Status Support #35

Closed FyerPower closed 2 years ago

FyerPower commented 2 years ago

Hello! I was looking through the code and notice that you use PatBox's Placeholder API for a couple of things already but was wondering if you'd be able to add placeholders for the various ServerCore Statuses.

I use the StyledPlayerList mod and it offers the ability to put all available placeholders onto the tab menu. We use this atm to show the Servers TPS / MSPT, the CPU Usage (provided by Spark), and would love to add in various datapoints from ServerCore too! One of which i'd be specifically interested in would be the mobcaps (Ideally I'd be able to format it similar to how Carpet logs its mobcaps in the tab screen). Could see this being very useful to show

For documentation on adding placeholders see: https://placeholders.pb4.eu/dev/adding-placeholders/

Thanks!

Wesley1808 commented 2 years ago

A few of the servercore - specific datapoints (+ some general ones) are already accessible here. I may consider adding mobcap values aswell although these values can in theory be retrieved by any other mod aswell.

For the few of those that already exist, quickly summed up:

/servercore status

/statistics

FyerPower commented 2 years ago

Oh perfect. I had did a search for "Placeholders" in the repository and of course that class didn't show up, sigh. That is great to hear that you have many of these already implemented!!