DenizenScript / Denizen

NPC and general Spigot scripting, using the Denizen Scripting Language!
https://denizenscript.com/
MIT License
213 stars 106 forks source link

Add `NUM_PLAYERS` determination #2584

Closed BreadcrumbIsTaken closed 10 months ago

BreadcrumbIsTaken commented 10 months ago

Adds the NUM_PLAYERS:<ElementTag(Number)> determination to the server list ping event

Customize the amount of players online in the server list.

Also modernizes the determinations/contexts for the ListPingScriptEvent and ServerListPingScriptEventPaperImpl (so long!) class.

Requested by Ikuria

Notes:

It's been a while since I've used the new determination format (I actually don't know if I've ever used it at all) so if I messed it up, please let me know. I tested all the determinations and they both worked the same way, so hopefully I didn't make a mistake that I can't see!