KO
|
EN
gitlite โ search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
go-mcping
โ 10
Open GitHub โ
A Minecraft server ping library in Golang
Download README (.md)
Explore Similar Repositories
Proffy
:
๐ Project developed during the Next Level Week 2 ๐ฅ #NLW ๐ฅ By @Rocketseat
VL.Devices.DeckLink
:
A package for using DeckLink capture cards by Blackmagic Design in VL
libtidal
:
My boot.tidal files
matlab
:
๐ง๐ปโโ๏ธ Dark theme for MATLAB
Mini_Data_Middle_Plateform
:
ๅบไบPython+Flask+MySQL็ๆฐๆฎๅพฎไธญๅฐ๏ผๆฏๆๆฐๆฎๅบ็ฎก็ใๆฐๆฎๆถ้๏ผๆไน็ฌ่ซ็ญ๏ผ็ญๅ่ฝ
// repository documentation
Was this content helpful?
โ 0
(0 ratings)
Select Rating:
โ
โ
โ
โ
โ
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
go-mcping
?
Download (.md)
# go-mcping A Minecraft server ping library in Golang ## Features - Ping Minecraft server (1.7.X-1.16.X) - Resolve SRV record - Get favicon & motd - Get players list - Get latency of the server - Custom timeout - Custom DNS server ## Installation go-mcping requires a Go version with Modules support and uses import versioning. So please make sure to initialize a Go module before installing go-mcping. ```bash go get github.com/iverly/go-mcping ``` Import: ```go import "github.com/iverly/go-mcping" ``` ## Quickstart ```go import ( "github.com/iverly/go-mcping/mcping" ) func main() { pinger := mcping.NewPinger() response, err := pinger.Ping("funcraft.net", 25565) } ``` PingResponse structure: ```go type PingResponse struct { Latency uint // Latency between you and the server PlayerCount PlayerCount // Players count information of the server Protocol int // Protocol number of the server Favicon string // Favicon in base64 of the server Motd string // Motd of the server without color Version string // Version of the server Sample []PlayerSample // List of connected players on the server } type PlayerCount struct { Online int // Number of connected players on the server Max int // Number of maximum players on the server } ``` ## Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate. ## License [MIT](https://choosealicense.com/licenses/mit/) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.