Coder Social home page Coder Social logo

mcwhitelist's Introduction

MCWhitelist

##A plugin for whitelisting users.

Based originally on the https://github.com/Bitjump/SubWhitelister mod.

It calls URL's to handle whitlisting of users. The idea behind it is to let only destiny.gg subscribers onto the server and when they join, print an announcement message. The plugin is not at all restricted to destiny.gg,

URLs

Name Method Parameters Expected response Description
check GET privatekey, uuid 200 status code and json object like {"end":1234567890000} when caching of a user expires, the mod calls this url to check if the user is still whitelisted, the end timestamp is used for caching purposes
register POST privatekey, name, uuid 200 status code and json object like {"nick":"foobar","end":1234567890000} the end has to be a time in UTC, basically a unix timestamp in milliseconds, the parameters are sent in application/x-www-form-urlencoded form
  • The privatekey parameter is purely to authenticate the server itself, it is always the same and is supposed to be kept a secret
  • The name is the minecraft name of the user
  • The uuid is the minecraft uuid connected to the user, it does not change as opposed to the name of the player
  • On error, the status code 403 will be regarded as the error code for an expired subscription, all other 4xx status codes are treated as errors

The nick property of the json object is used to announce the player to the server, to disable set the announcement message to an empty string. The announcement message uses two placeholders: {nick} the nick received from the API, and {name} the minecraft name of the player.

Installation

  • Compile or download the MCWhitelist.jar plugin binary into your plugins/ directory.
  • Save a copy of the auth config file to plugins/MCWhitelist/config.yml.
  • Update config.yml with your own REST API parameters.
  • Start your server

Commands and Permissions

Command Description Permission
/sw toggle Enables or disables the plugin. mcwhitelist.toggle
/sw exempt Exempts a user from checks. mcwhitelist.exempt

mcwhitelist's People

Contributors

danmudd avatar xtphty avatar sztanpet avatar

Stargazers

Hoi avatar

Watchers

James Cloos avatar Hayk Saakian avatar Cene avatar  avatar  avatar  avatar  avatar

Forkers

xtphty johbii

mcwhitelist's Issues

handle new responses from the api

uuidAlreadySet with status code 500 - when the user tries to register but a minecraft uuid was already set for the account and the old and new uuid differs (so basically if the uuid is already registered, im also open to changing the message to something more appropriate)

userBanned with status code 403 - when the user is banned

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.