Live Whitelist 图标

Live Whitelist

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.3.1
本资源为搬运资源,原资源地址: https://modrinth.com/mod/api-live-whitelist
资源信息

Minecraft 版本: 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6

平台: forge

标签: management social

资源介绍

A mod by cyber.98

This very simple mod allows you to connect to an api running somewhere on the internet (or on your machine) to validate or invalidate minecraft UUIDS. This was originally intended to be used with a discord bot running an api, but is completely valid outside of that use case. If you'd like to use the discord bot to make sure specific people have a role before joining, please skip to that section.

Configuration settings

The mod has two configuration settings:

api:[a url by default]
message:[a string by default]
  • The api url is what defines the base of where all requests should go. This can be a site, or an ip, but the server must allow for http connections.
  • The message string is what is shown to the player if the api is online, and responds with a false verification for that uuid.

Setting up an API

API setup is super simple. It should meet the following guidelines:

  • Have at least one endpoint, being at '/verify'
  • Respond within about 2 seconds to ensure no progress can be made by players before being kicked
  • follow this json guide for urls and responses:
URLS:
[base url defined in config]/[minecraft uuid sent from the server] // make sure you have something to parse the url bar, as the server sends get requests, not post requests.

Responses:

{
  "verified":boolean
}

It's that easy (at least for this version)

Discord bot setup

This mod comes feature complete with a discord bot!
Follow these steps to allow users to authenticate using the discord bot instead of having to make your own api!

Prerequisites

  • Script running is enabled on your system (see microsoft's page on this)
  • You have nodeJS and npm installed (I'm a js developer idk what you want me to do)

    Usage:

    /link uuid:[uuid] -> will link your discord account to your mojang account. if you don't know your uuid, try joining the server first, the server will tell it to you (assumming the api is running already).
    /unlink -> pretty self-explanatory, will remove your entry from the database, allowing you to relink it
    /ping -> gets the status of the api and some response times

    setup guide

    Head to The github page for the bot
    and download the source code as a zip. extract it, and open the root folder and run

    npm install

    and wait a few moments for it to get the required packages.
    afterwards, create a config.json file with the following information (fill in the fields)

    {
      "token":"discord bot token",
      "botname":"a name you wanna see in the terminal for the bot",
      "author":"your name",
      "clientId":"the bots client id",
      "adminids":["your user id"],
      "authorid":"your user id",
      "roleID":"the id of the role you want to look for"
    }

    your discord bot will need:
    Guild install only.
    Public bot off (unless you are not discord server admin)
    Server members intent.
    These permissions:
    Replace this with a descriptionScopes: application.commands, bot || Permissions: Use slash commands

Add in your token, and you're ready to hit the ground running!
To run the script, open the folder and run

npm start
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Coloured Outline GUI

价格:0 墨喵币
下载量:0

查看详情
CoopTweaks

价格:0 墨喵币
下载量:0

查看详情
Keep inventory nerf

价格:0 墨喵币
下载量:0

查看详情
Create Warium

价格:0 墨喵币
下载量:0

查看详情