1.0-SNAPSHOT
Compatibility
Changes
DisableInteraction Plugin / 禁用交互插件
A Minecraft Paper plugin for disabling right-click interactions with specific blocks.
一个用于禁用特定方块右键交互的Minecraft Paper插件。
Features / 功能特性
Configuration System / 配置系统
- Whitelist/Blacklist modes - Switch between allowing only listed blocks or blocking listed blocks
白名单/黑名单模式 - 切换仅允许列表中方块或阻止列表中方块 - Customizable messages - Set custom notification messages with color codes
可自定义消息 - 使用颜色代码设置自定义提示消息 - Message toggle - Enable/disable notification messages completely
消息开关 - 完全启用/禁用提示消息 - Dynamic block list - Manage block list through commands, no config editing required
动态方块列表 - 通过命令管理方块列表,无需编辑配置文件
Command System / 命令系统
- Complete command set for managing block interactions
完整的管理方块交互命令集 - Tab completion support for block IDs and commands
支持方块ID和命令的Tab补全 - Handheld block detection when no block ID specified
未指定方块ID时检测手持方块
Permission System / 权限系统
- Admin permissions for managing the plugin
用于管理插件的管理员权限 - Bypass permission to ignore interaction restrictions
绕过交互限制的权限
Installation / 安装
Requirements / 要求
- Minecraft Server 1.21+
Minecraft服务器 1.21+ - Paper/Spigot API 1.21.11+
Paper/Spigot API 1.21.11+
Steps / 步骤
- Download the latest
DisableInteraction-1.0-SNAPSHOT.jarfrom thebuild/libsfolder
从build/libs文件夹下载最新的DisableInteraction-1.0-SNAPSHOT.jar - Place the JAR file in your server's
pluginsfolder
将JAR文件放入服务器的plugins文件夹 - Restart or reload your server (
/reloador/plugman reload DisableInteraction)
重启或重载服务器(/reload或/plugman reload DisableInteraction) - The plugin will generate a default configuration file at
plugins/DisableInteraction/config.yml
插件将在plugins/DisableInteraction/config.yml生成默认配置文件
Configuration / 配置
Default Configuration File / 默认配置文件
# DisableInteraction Plugin Configuration File
# DisableInteraction 插件配置文件
# Mode settings: "whitelist" or "blacklist" (default: blacklist)
# 模式设置:"whitelist" 或 "blacklist"(默认:blacklist)
mode: "blacklist"
# Message settings (supports color codes using & symbol)
# 消息设置(支持使用&符号的颜色代码)
messages:
# Enable/disable notification messages (true/false)
# 启用/禁用提示消息(true/false)
enabled: true
# Message for blacklist mode
# 黑名单模式下的提示消息
blacklist: "&c这个方块已被禁用交互。"
# Message for whitelist mode
# 白名单模式下的提示消息
whitelist: "&c只有白名单中的方块可以交互。"
# Block list (Block IDs in uppercase, e.g., OAK_DOOR, STONE_BUTTON, CHEST)
# 方块列表(大写方块ID,例如:OAK_DOOR, STONE_BUTTON, CHEST)
# Blacklist mode: Blocks in this list cannot be interacted with
# Whitelist mode: Only blocks in this list can be interacted with
# Note: Default list is empty, add blocks using commands
# 黑名单模式:列表中的方块无法交互
# 白名单模式:只有列表中的方块可以交互
# 注意:默认列表为空,使用命令添加方块
blocks: []
Configuration Reload / 配置重载
Use /disableinteraction reload to reload the configuration without restarting the server.
使用 /disableinteraction reload 重载配置而无需重启服务器。
Commands / 命令
Main Command / 主命令
/disableinteraction [subcommand]
Subcommands / 子命令
Mode Management / 模式管理
| Command / 命令 | Description / 描述 | Permission / 权限 |
|---|---|---|
/disableinteraction whitelist |
Switch to whitelist mode (only listed blocks can be interacted with) 切换到白名单模式(只有列表中的方块可以交互) |
disableinteraction.admin |
/disableinteraction blacklist |
Switch to blacklist mode (listed blocks cannot be interacted with) 切换到黑名单模式(列表中的方块无法交互) |
disableinteraction.admin |
Block Management / 方块管理
| Command / 命令 | Description / 描述 | Permission / 权限 |
|---|---|---|
/disableinteraction add [blockID] |
Add a block to the list (uses held block if no ID specified) 添加方块到列表(未指定ID时使用手持方块) |
disableinteraction.admin |
/disableinteraction remove [blockID] |
Remove a block from the list (uses held block if no ID specified) 从列表移除方块(未指定ID时使用手持方块) |
disableinteraction.admin |
/disableinteraction list [page] |
View the current block list with pagination 查看当前方块列表(分页显示) |
disableinteraction.admin |
Utility Commands / 实用命令
| Command / 命令 | Description / 描述 | Permission / 权限 |
|---|---|---|
/disableinteraction reload |
Reload the configuration file 重新加载配置文件 |
disableinteraction.admin |
/disableinteraction (no args) |
Show command help 显示命令帮助 |
None |
Examples / 示例
# Add blocks to the list
# 添加方块到列表
/disableinteraction add OAK_DOOR
/disableinteraction add CHEST
/disableinteraction add # Uses held block
# Remove blocks from the list
# 从列表移除方块
/disableinteraction remove STONE_BUTTON
# View block list
# 查看方块列表
/disableinteraction list
/disableinteraction list 2 # Page 2
# Switch modes
# 切换模式
/disableinteraction whitelist
/disableinteraction blacklist
# Reload configuration
# 重新加载配置
/disableinteraction reload
Permissions / 权限
| Permission Node / 权限节点 | Description / 描述 | Default / 默认 |
|---|---|---|
disableinteraction.admin |
Allows use of all management commands 允许使用所有管理命令 |
op |
disableinteraction.bypass |
Allows bypassing interaction restrictions 允许绕过交互限制 |
op |
Permission Examples / 权限示例
# Give a player admin permissions
# 给予玩家管理员权限
/luckperms user <player> permission set disableinteraction.admin true
# Give a player bypass permissions
# 给予玩家绕过权限
/luckperms user <player> permission set disableinteraction.bypass true
# Give a group admin permissions
# 给予组管理员权限
/luckperms group <group> permission set disableinteraction.admin true
How It Works / 工作原理
Interaction Logic / 交互逻辑
-
Blacklist Mode / 黑名单模式:
- Blocks in the list: ❌ Interaction blocked
- Blocks not in the list: ✅ Interaction allowed
- 列表中的方块:❌ 交互被阻止
- 不在列表中的方块:✅ 交互允许
-
Whitelist Mode / 白名单模式:
- Blocks in the list: ✅ Interaction allowed
- Blocks not in the list: ❌ Interaction blocked
- 列表中的方块:✅ 交互允许
- 不在列表中的方块:❌ 交互被阻止
Message System / 消息系统
- When
messages.enabled: true: Players receive configured messages when interaction is blocked
当messages.enabled: true:交互被阻止时玩家收到配置的消息 - When
messages.enabled: false: Interaction is silently blocked without messages
当messages.enabled: false:交互被静默阻止,不显示消息 - Messages support Minecraft color codes using
&symbol (e.g.,&cfor red,&afor green)
消息支持使用&符号的Minecraft颜色代码(例如:&c红色,&a绿色)
Bypass Permission / 绕过权限
Players with disableinteraction.bypass permission can interact with all blocks regardless of configuration.
拥有 disableinteraction.bypass 权限的玩家可以无视配置与所有方块交互。
Development / 开发
Building from Source / 从源码构建
# Clone the repository
# 克隆仓库
git clone <repository-url>
cd DisableInteraction
# Build the plugin
# 构建插件
./gradlew build
# The JAR file will be in build/libs/
# JAR文件将在 build/libs/ 目录中
Project Structure / 项目结构
src/main/java/com/lorshancraft/disableInteraction/
├── DisableInteraction.java # Main plugin class / 主插件类
├── ConfigManager.java # Configuration management / 配置管理
├── InteractionListener.java # Event listener for interactions / 交互事件监听器
└── CommandHandler.java # Command implementation / 命令实现
src/main/resources/
├── plugin.yml # Plugin metadata / 插件元数据
└── config.yml # Default configuration / 默认配置
Dependencies / 依赖
- Paper API 1.21.11-R0.1-SNAPSHOT
- Java 21+
Troubleshooting / 故障排除
Common Issues / 常见问题
| Issue / 问题 | Solution / 解决方案 |
|---|---|
| Plugin doesn't load / 插件未加载 | Check server logs for errors, ensure you're using Paper 1.21+ 检查服务器日志中的错误,确保使用 Paper 1.21+ |
| Commands don't work / 命令不工作 | Check permission nodes, ensure command is registered in plugin.yml 检查权限节点,确保命令在plugin.yml中注册 |
| Configuration doesn't apply / 配置不生效 | Use /disableinteraction reload or restart server 使用 /disableinteraction reload 或重启服务器 |
| Invalid block IDs / 无效的方块ID | Use correct Material enum names (e.g., OAK_DOOR, STONE_BUTTON) 使用正确的Material枚举名称(例如: OAK_DOOR, STONE_BUTTON) |
| No notification messages / 没有提示消息 | Check messages.enabled in config.yml 检查config.yml中的 messages.enabled |
Debugging / 调试
Enable debug mode in server logs:
在服务器日志中启用调试模式:
# In server.properties or paper-world-defaults.yml
# 在 server.properties 或 paper-world-defaults.yml 中
debug: true
Check plugin logs after loading:
加载后检查插件日志:
# The plugin logs its status on startup
# 插件在启动时会记录其状态
[DisableInteraction] Plugin enabled
[DisableInteraction] Current mode: blacklist
[DisableInteraction] Loaded blocks: 5
Changelog / 更新日志
v1.0-SNAPSHOT
- Initial release with whitelist/blacklist modes
初始版本,包含白名单/黑名单模式 - Dynamic block management through commands
通过命令动态管理方块 - Customizable messages with toggle
可自定义消息及开关 - Complete permission system
完整的权限系统 - Tab completion for commands and block IDs
命令和方块ID的Tab补全
License / 许可证
This project is licensed under the MIT License - see the LICENSE file for details.
本项目基于 MIT 许可证 - 详见 LICENSE 文件。
Support / 支持
For issues, feature requests, or questions:
问题、功能请求或疑问:
- Check the GitHub Issues
查看 GitHub Issues - Join our Discord server
加入我们的Discord服务器 - Contact the developer directly
直接联系开发者
Credits / 致谢
- Developed by LorShanCraft Development Team
由 LorShanCraft 开发团队开发 - Built with Paper API
基于 Paper API 构建 - Inspired by community needs for block interaction management
受社区对方块交互管理需求的启发
Last Updated: 2026-03-16
最后更新:2026年3月16日
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:Lpmypkcg:XdaDCoh4"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:Lpmypkcg:XdaDCoh4"
}
