Skip to content

Valiec/minecraft-query-v3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minecraft-query

A fork/revival of minecraft-query:

Original README below:

Gem Version

Usage

To simply get basic information about the server just require 'minecraft-query' and

query = Query::simpleQuery('server.ip.here', 25565)

which will return

=> {:motd=>"ECS Survival", :gametype=>"SMP", :map=>"world", :numplayers=>"1", :maxplayers=>"20"}

The 25565 needs to be set to whatever the port you have set for query in server.properties

To get a full list of information, the syntax is

query = Query::fullQuery('server.ip.here', 25565)

You can also do fun things such as

players = query[:numplayers] + '/' + query[:maxplayers]

to get a nice => 1/20 which can easily be handled on a website.

RCON

The Remote CONtrol part of the gem is implemented, but still being developed. If you want to know syntax, have a look at the source (lib/rcon.rb) for now until I get around to documenting it

About

Fork of minecraft-query-v2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%