generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
217b527
commit 89d7191
Showing
1 changed file
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |