Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mcjsonapi

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mcjsonapi

  • 0.9.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

mcjsonapi Build Status

This rubygem provides an easy way to interact with a Minecraft (bukkit) server running the JSONAPI plugin. It uses the v2-API, so it has full support for permissions.

Calling multiple methods is not yet implemented, but is planned for the 1.0 release.

Installation

Add this line to your application's Gemfile:

gem 'mcjsonapi', '~> 0.9.0'

(Don't forget to run $ bundle install)

Or install it manually:

$ gem install mcjsonapi

Usage

require "mcjsonapi"

# Create a new API instance
api = Mcjsonapi::API.new username: "username", password: "password", host: "localhost", port: 20059
# localhost:20059 is assumed as default host/port

# Call a single method
api.call "server.version"
# => "git-Bukkit-1.6.4-R2.0-b2918jnks (MC: 1.6.4)"

# Call a method with arguments
api.call { name: "players.online.send_message", arguments: ["Player", "Hello World"] }

# Generate a call key
api.generate_key("server.version")
# => "8433478ce05d331c743ff69cad00792039396d222d304545bd40f2ccecd714c9"
    
# Calling multiple methods at once is not yet implemented.

License

This project is available under the permissive MIT license. (See LICENSE.md for details). Any type of contribution is appreciated.

FAQs

Package last updated on 07 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc