To show, how many players are on the server vanilla, we will use the placeholder %pinger_players_<ip>:<port>%
Please keep in mind, that Pinger placeholders have their own update interval, to change it, go to the PlaceholderAPI config file and change the
check_interval: (default is 30 seconds).
But what if the server is currently offline?
In this case, we can use a second item with a lower priority, that will be displayed, if the
view_requirement: of the first item isn't true.
So now we can show a different item, if the server is offline. But keep in mind that the items don't update automatically, if the view requirement has changed (from Offline to Online). We can update the menu, by letting the player execute
[refresh] if he clicks on the item.