Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
codetheweb committed Dec 11, 2020
1 parent 217b527 commit 89d7191
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
# Fabric Example Mod
# Diorite

## Setup
Diorite is an ultra-simple whitelist plugin for Minecraft. When a player joins, it makes a GET request to an external HTTP API containing the player UUID (not containing dashes) like so:

For setup instructions please see the [fabric wiki page](https://fabricmc.net/wiki/tutorial:setup) that relates to the IDE that you are using.
```
GET https://example.com?uuid=player-id
```

## License
If the API responds with 401, the player is blocked from joining and the body of the HTTP response is sent to the player as a reason. Otherwise, the player is allowed to join.

### Usage

Download a build from the [Releases page](https://github.com/Keweenaw-Kube/diorite/releases) and put it in the `mods/` directory.

After running the server with it installed for the first time, a config file will be created at `mods/diorite/config.yaml`. Fill in `endpoint` with the URL you want Diorite to call. There's an additional, optional property:

```yml
# Will make request https://example.com?uuid=player-id&token=my-auth-token
endpoint: "https://example.com"
queryParams:
token: "my-auth-token"
```
### License
This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects.

0 comments on commit 89d7191

Please sign in to comment.