Skip to content

A simple library to ping Minecraft: Java Edition servers using Elixir.

License

Notifications You must be signed in to change notification settings

astei/mcping-elixir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCPing

This is a simple library that you can use to ping Minecraft: Java Edition servers using Elixir. It's built primarily on Erlang's gen_tcp support, and the response JSON is deserialized automatically with Jason.

How to Use It

It's pretty easy. Here's how you might use it:

{:ok, response} = MCPing.get_info("mc.hypixel.net")

get_info takes three parameters, of which only the address is required. The return value is a tuple:

  • {:ok, status} - we were able to contact the server successfully.
  • {:error, reason} - we were unable to contact the server (the reason is usually from the underlying gen_tcp client).

The docs can be found at https://hexdocs.pm/mcping.

Installation

This package can be installed by adding mcping to your list of dependencies in mix.exs:

def deps do
  [
    {:mcping, "~> 0.2.0"}
  ]
end

About

A simple library to ping Minecraft: Java Edition servers using Elixir.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages