- Compatible API Versions
- 1.0.11
- Contributors
- Superice666
NKHI Hello, Nukkit!
What's this?A useful plugin that enables you to get the info of your server via HTTP and make badges for your server. Also it supports CORS which means you can make custom dynamic badges for your server and get the info dynamicly on your server's website via ajax !
Install:
Download NKHI.jar and put it info the plugins folder. Or you can install it by execute command
bnpm install NKHI
.NKHI will run on the port 80. You can also change it by editing ./plugins/NKHI/config.yml
TIPS: If you're using Windows Server, do NOT forget to change windows firewall settings! NKHI uses tcp.
Usage:
Just sned a get request or open the following address in your browser:
http://YOUR IP OR DOMIN/NKHI
Then you'll get the info of your nukkit server in JSON format, here's an example:
JSON:
{
"base": "Nukkit",
"playerNumber": 2,
"playerNames": ["Steve","Alex"],
"version": "v1.16.220",
"motd": "A Nukkit Powered Server",
"submotd": "https://nukkitx.com",
"tps": 20
}
you can make your custom badges by shields.io. Here're some examples:
https://img.shields.io/badge/dynamic/json?color=informational&label=MyServer&suffix=%20TPS&query=%24.tps&url=http%3A%2F%2F YOUR IP OR DOMIN %3A YOUR PORT %2FNKHI&style=for-the-badge
https://img.shields.io/badge/dynamic/json?color=yellow&label=Online&suffix=%20Players&query=%24.playerNumber&url=http%3A%2F%2F YOUR IP OR DOMIN%3A YOUR PORT %2FNKHI&style=for-the-badge