免责声明: > 本模组收集并记录玩家 IP 地址,仅用于维护服务器完整性以及执行基于用户名和 IP 的访问控制。
所有收集的数据仅用于本模组提供的功能。
在使用本模组之前,服务器管理员必须确保:
-
玩家同意: 必须告知玩家并将他们知晓其 IP 地址将被收集并与用户名关联以进行访问控制。
-
数据使用: 收集的 IP 仅用于访问控制,并在内部存储——绝不分享给服务器工作人员以外的任何方。
-
数据安全: 服务器所有者负责保护此信息的安全,并确保只有授权管理员可以访问。
描述
SenthryX 是一个服务端白名单模组,它将用户名绑定到特定的 IP 地址。它通过仅允许白名单中的受信任玩家加入服务器来强制执行严格的访问控制。这可以防止未授权的访问,阻止来自未绑定 IP 地址的登录尝试,并保护免受用户名欺骗的影响。SenthryX 尤其推荐在运行于离线模式的服务器上安装。它还支持每个玩家绑定多个 IP,因此兼容动态 IP 地址。为了增加便利性,SenthryX 集成了 Discord 机器人,该机器人提供实时失败的登录尝试警报,并通过机器人命令启用服务器管理;您也可以禁用机器人集成。
功能
-
基于用户名和 IP 地址的访问控制
-
Discord 机器人集成:
- 访问尝试警报。
- 直接从 Discord 管理白名单条目。
- 根据需要启用或禁用 Discord 机器人功能。
安装指南
-
下载模组
-
安装模组
-
初始服务器启动
- 启动或重启您的服务器。首次启动时会出现错误——这是正常的。在此过程中,将在
config/senthryX 目录中生成一个名为 config.json 的文件。
-
如果您希望启用 Discord 集成功能,请配置 Discord 机器人。请参阅下方逐步流程详情。
-
配置模组
- 打开
config.json 文件并根据需要调整设置。请参阅下方的 配置值 部分以获取指导。
-
重启服务器
- 配置好 config.json 文件后,重启服务器以应用更改。
配置值
点击展开
要配置,请导航至 /config/senthryX/config.json
| Key |
Value |
Description |
| activate |
boolean |
启用或禁用模组。设置为 true 以启用,或 false 以禁用。 |
| enable_discord |
boolean |
启用或禁用 Discord 集成。设置为 true 以使用 Discord 机器人,或 false 以关闭它。 |
| bot_token |
String |
您的 Discord 机器人令牌。机器人连接到您的 Discord 服务器所需。 |
| admin_channel_id |
String |
管理员可以运行命令(如白名单玩家)的 Discord 频道 ID。 |
| enable_public_logging |
Boolean |
启用或禁用公共日志记录。设置为 true 以在公共频道发布日志。 |
| public_log_channel |
String |
发送公共日志的 Discord 频道 ID。 |
| admin_ids |
Array of Strings |
拥有使用机器人命令权限的管理员 Discord 用户 ID 列表。 |
| presence |
String |
Discord 机器人显示的自定义状态文本(例如,“正在监视服务器”)。 |
| kick_message |
String |
显示给未列入白名单的玩家的提示信息。您可以自定义此内容。 |
| unknown_ip_message |
String |
显示给从未知 IP 地址连接的玩家的提示信息。您可以自定义此内容。 |
控制台命令
点击展开
| 命令 |
用法 |
/senthryx whitelist add <username> <ip> |
用于将玩家加入白名单的命令。 |
/senthryx whitelist remove <username> |
用于从白名单条目中移除玩家的命令。 |
/senthryx ip add <username> <ip> |
用于为玩家添加新 IP 的命令。 |
| /senthryx reload |
在手动编辑玩家列表文件后,重新加载玩家列表。 |
| /senthryx count |
用于统计已列入白名单的玩家总数。 |
Discord 管理员命令
点击展开
| 命令 |
用法 |
/whitelist_add <用户名> <IP> |
用于将玩家加入白名单的命令。 |
| /whitelist_remove <用户名> | 从白名单中移除玩家的命令。 |
| /add_ip <用户名> <IP地址> | 为玩家添加新 IP 的命令。 |
| /player_count | 统计已加入白名单的玩家总数。 |
配置 Discord 机器人
点击展开
步骤 1:创建 Discord 机器人
-
前往 Discord 开发者门户
-
点击“新建应用程序”,为其命名(例如 MinecraftBot),然后点击创建。
-
在左侧边栏中,进入 Bot → 点击“添加机器人” → 通过点击“Yes, do it!”确认。
步骤 2:获取机器人令牌
-
在 Bot 部分下,点击“重置令牌”或在令牌字段下点击“复制”。
-
将此令牌保存在安全的地方——你将在配置文件中用到它(切勿分享此令牌。它将赋予你对你机器人的完全控制权)。
步骤 2:获取机器人令牌
仍在 Bot 部分下:
-
向下滚动到“特权网关意图”。
-
启用:- Presence Intent
-
Prensence Intent
-
Server Members Intent
- 点击底部的「保存更改」。
步骤 4:将机器人邀请至你的 Discord 服务器
-
进入 OAuth2 → URL 生成器部分。
-
在「作用域(Scopes)」下,勾选:
-
在「机器人权限(Bot Permissions)」下,勾选:
-
复制生成的 URL 并在浏览器中打开。
-
选择你的服务器并点击「授权」。
步骤 5:配置你的 config.json 文件
- 现在编辑位于
/config/setrix/ 目录下的 config.json 文件。以下是一个示例:
Disclaimer: > This mod collects and logs player IP addresses solely for the purpose of maintaining server integrity, and enforcing username-IP-based access control.
All collected data is used exclusively for the features provided by this mod.
Before using this mod, server administrators must ensure:
-
Player Consent: Players must be informed and acknowledge that their IP addresses will be collected and linked to their usernames for access control.
-
Data Use: Collected IPs are used solely for access enforcement and are stored internally — never shared outside the server staff.
-
Data Security: Server owners are responsible for securing this information and ensuring only authorized administrators have access.
Description
SenthryX is a server-side whitelist mod that binds usernames to specific IP addresses. It enforces strict access control by allowing only whitelisted and trusted players to join the server. This prevents unauthorized access, blocks login attempts from unbound IP addresses, and protects against username spoofing. SenthryX is especially recommended for servers running in offline mode. It also supports multiple IP bindings per player, making it compatible with dynamic IP addresses. For added convenience, SenthryX integrates with a Discord bot that provides real-time alerts for failed login attempts and enables server management through bot commands, the bot integration can also be disabled.
Features
Installation guide
-
Download the Mod
-
Install the Mod
-
Place the downloaded mod file into the mods folder within your Minecraft directory.
-
In server.properties, it’s recommended to disable the built in whitelist (white-list=false) to allow the mod to fully handle access control based on usernames and IPs.
- Optionally, you can leave the built in whitelist enabled for an additional layer of security, but this is not required.
-
Initial Server Startup
- Start or restart your server. On the first startup, an error is expected—this is normal. During this process, a file named
config.json will be generated in the config/senthryX directory.
-
Configure the Discord bot if you want to enable the Discord integration feature. See the details for step by step process below.
-
Configure the Mod
- Open the
config.json file and adjust the settings as needed. Refer to the Configuration Values section below for guidance.
-
Restart the Server
- Once you’ve configured the config.json file, restart your server to apply the changes.
Configuration Values
Click to expand
To configure, navigate to /config/senthryX/config.json
| Key |
Value |
Description |
| activate |
boolean |
Enables or disables the mod. Set to true to enable, or false to disable it. |
| enable_discord |
boolean |
Enables or disables Discord integration. Set to true to use the Discord bot, or false to turn it off. |
| bot_token |
String |
Your Discord bot token. Required for the bot to connect to your Discord server. |
| admin_channel_id |
String |
ID of the Discord channel where admins can run commands like whitelisting players. |
| enable_public_logging |
Boolean |
Enables or disables public logging. Set to true to post logs in a public channel. |
| public_log_channel |
String |
ID of the Discord channel where public logs will be sent. |
| admin_ids |
Array of Strings |
A list of Discord user IDs who have admin permissions for using bot commands. |
| presence |
String |
Custom status text shown by the Discord bot (e.g., “Watching the server”). |
| kick_message |
String |
Message shown to players who are not whitelisted. You can customize this. |
| unknown_ip_message |
String |
Message shown to players connecting from an unknown IP address. You can customize this. |
Console Commands
Click to expand
| Command |
Usage |
/senthryx whitelist add <username> <ip> |
Command for whitelisting a player. |
/senthryx whitelist remove <username> |
Command to remove a player from whitelist entry. |
/senthryx ip add <username> <ip> |
Command to add a new ip for player. |
| /senthryx reload |
To reload the player list in case of editing player list file manually |
| /senthryx count |
To count total whitelisted players. |
Discord Admin Commands
Click to expand
| Command |
Usage |
/whitelist_add <username> <ip> |
Command for whitelisting a player. |
/whitelist_remove <username> |
Command to remove a player from whitelist entry. |
/add_ip <username> <ip> |
Command to add a new ip for player. |
| /player_count |
To count total whitelisted players. |
Configure Discord Bot
Click to expand
Step 1: Create a Discord Bot
-
Go to the Discord Developer Portal
-
Click "New Application", give it a name (e.g., MinecraftBot), and click Create.
-
In the left sidebar, go to Bot → Click Add Bot → Confirm by clicking Yes, do it!.
Step 2: Get the Bot Token
-
Under the Bot section, click "Reset Token" or "Copy" under the Token field.
-
Save this token somewhere secure — you'll need it in the config file(Do not share this token. It gives full control of your bot.).
Step 2: Get the Bot Token
Still under the Bot section:
-
Scroll down to Privileged Gateway Intents.
-
Enable: - Presence Intent
-
Prensence Intent
-
Server Members Intent
-
Message Content Intent
-
Click Save Changes at the bottom.
Step 4: Invite the Bot to Your Discord Server
-
Go to the OAuth2 → URL Generator section.
-
Under Scopes, check:
-
Under Bot Permissions, check:
-
Send Messages
-
Read Message History
-
Copy the generated URL and open it in your browser.
-
Select your server and click Authorize.
Step 5: Configure Your config.json File
- Now edit the
config.json file located in /config/setrix/. Here’s an example:
评论 0
登录后参与评分
还没有评论,来抢沙发吧