LittleLink
一个轻量级的 Spigot 插件,可在服务器上启用基于 Discord 的白名单功能。
尽管看起来该插件似乎未更新,但它实际上运行良好(已于 2025 年 2 月编辑)。我会持续监控其与最新版本的兼容性,并在需要时进行更新。如果你发现了 bug,请加入 支持 Discord
设置
在使用此插件之前,你需要使用 此链接 将 SuperLink Discord 机器人邀请到你的服务器。
现在从 releases 下载最新版本的文件,并将其放入你的 plugins 文件夹中。
启动一次服务器以生成所需的配置文件。
现在进入 plugins/LittleLink 并根据你的服务器需求编辑 config.yml。
guild: 264801645370671114
role:
use: false
id: 426156903555399680
guild 代表 Discord 服务器的 ID
role.use 启用基于角色的身份验证,默认为 false(插件仅检查公会成员资格)
role.id 代表用户加入所需拥有的角色 ID
如果你不知道如何查找角色和公会 ID,首先需要启用 Discord 开发者模式。你可以在 这里 找到教程。
重启服务器并享受你的新插件。
查询命令
该命令允许你根据 Minecraft 用户名快速查找 Discord 用户。仅对已关联账号的用户有效。查询是全局的,意味着用户无需在线或属于你的 Discord 服务器。
为了让玩家使用此命令,他们需要拥有权限 littlelink.command.lookup。
工作原理?
此插件需要在你的服务器中添加一个 Discord 机器人以获取所有数据。Discord 机器人由我托管,从而实现了插件极小的占用空间。如果你想了解更多关于该机器人及其 API 的信息,请访问 Pequla/SuperLink。
插件会对运行在机器人应用程序内部的 API 发起简单的 HTTP GET 请求。在处理信息后,它会决定是让玩家加入还是踢出他们并显示一条信息。
也在寻找 Webhook 集成吗?此插件只是一个核心白名单系统。它包含一个 API,以便其他插件可以访问 Discord 数据。Webhook 插件可在 这里 找到。
其他插件
不确定你需要什么?很可能你只需要 LittleHooks。它为 Discord 服务器增添了出色的外观和体验,并有助于提升服务器活跃度。
针对开发者
插件包含一个简单的 API。为了使用它,我建议将插件 jar 包作为库导入。接收到插件实例后,只需通过 LittleLink#getPlayerData() 访问包含所有玩家数据的 HashMap。
数据类为 com.pequla.link.model.DataModel。
示例设置代码:
@Override
public void onEnable(){
PluginManager manager = getServer().getPluginManager();
LittleLink plugin = (LittleLink) manager.getPlugin("LittleLink");
if (plugin == null) {
getLogger().warning("Plugin LittleLink not found");
manager.disablePlugin(this);
return;
}
// onEnable 逻辑的其余部分...
}
你可以从我的 Maven 仓库导入 Maven 包。
<repository>
<id>pequla-repo</id>
<url>https://maven.pequla.com/releases</url>
</repository>
<dependency>
<groupId>com.pequla</groupId>
<artifactId>little-link</artifactId>
<version>1.9</version>
<scope>provided</scope>
</dependency>
在访问插件实例之前,别忘了在 resources/plugin.yml 中将 LittleLink 添加为你的插件依赖项。
LittleLink
Tiny Spigot plugin that enables Discord based whitelisting on the server
Even if it seams like this plugin isn't updated its actually working fine (edited in Feb 2025). I am always monitoring compatibility with latestest versions and will do an update as soon as its required. If you managed to find a bug please join the support discord here
Setup
Before you start using this plugin you will need to invite SuperLink discord bot to your server
using this link
Now download the latest file from releases and put it into your
plugins folder
Start the server once in order to generate required config files
Now go to plugins/LittleLink and edit the config.yml based by your server needs
guild: 264801645370671114
role:
use: false
id: 426156903555399680
guild represents the discord server id
role.use enable role based authentication, default is false (plugin will check for guild only)
role.id represents the role id user is required to have in order to join
If you don't know how to find a role and guild id you first need to enable discord developer mode. You can find a tutorial here
Restart the server and enjoy your new plugin
Lookup command
Command allows you to quickly find a Discord user based of the Minecraft username. Works only for people who have linked
accounts. The lookup is global meaning users don't need to be online or be part of your Discord server
In order for players to use this command they will need the permission littlelink.command.lookup
How it works?
This plugin requires a discord bot in your server in order to retrieve all data. Discord bot is hosted by me enabling
the tiny footprint of the plugin. If you want to find out more about the bot and its API please go
to Pequla/SuperLink
Plugin does a simple HTTP GET request towards the API running inside the bot application. After processing the
information it decides if it should let the player join or kick it with an info message.
Looking for webhook integration as well? This plugin is just a core whitelisting system. It contains an api inside so other plugins can access the discord data. Webhook plugin available here
Other plugins
- LittleWeb - Provides a REST API for a more complete server status
- LittleHooks - Discord Webhook integration
Not sure what you need? Most likely you just need LittleHooks. It adds an awesome look and feel to the discord server with a bonus of boosting server activity.
For developers
Plugin contains a simple API. In order to consume it I suggest importing the plugin jar as a library. After receiving
the instance of the plugin just access the HashMap with all the player data by LittleLink#getPlayerData().
Data class is com.pequla.link.model.DataModel
Example setup code:
@Override
public void onEnable(){
PluginManager manager = getServer().getPluginManager();
LittleLink plugin = (LittleLink) manager.getPlugin("LittleLink");
if (plugin == null) {
getLogger().warning("Plugin LittleLink not found");
manager.disablePlugin(this);
return;
}
// The rest of onEnable logic...
}
You can import the maven package from my maven repository
<repository>
<id>pequla-repo</id>
<url>https://maven.pequla.com/releases</url>
</repository>
<dependency>
<groupId>com.pequla</groupId>
<artifactId>little-link</artifactId>
<version>1.9</version>
<scope>provided</scope>
</dependency>
Before accessing the plugin instance don't forget to put LittleLink as your plugin dependency in resources/plugin.yml
评论 0
登录后参与评分
还没有评论,来抢沙发吧