Skip to content

Version 2 of the old forked rubygem, completely redone/refactored.

License

Notifications You must be signed in to change notification settings

mvcodeclub/minecraft-query

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minecraft-query

Official version 1 of the old forked rubygem, completely redone/refactored.

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

Version 2 of the old forked rubygem, completely redone/refactored.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%