Dimension Control Mod
一个强大的 Minecraft 1.21.4 Fabric 服务端模组,赋予管理员对维度访问、物品/方块限制以及实体生成的完全控制权。
功能
? 维度管理
- 启用/禁用维度:完全阻止进入特定维度
- 基于权限的访问控制:控制哪些玩家等级可以进入每个维度
- 实时配置更改:无需重启服务器即可立即生效
? 物品与方块限制
- 阻止获取物品:防止玩家在特定维度拾取指定物品
- 破坏限制:限制在每个维度中可以破坏的方块
- 按维度规则:主世界、下界、末地及自定义维度各有不同的限制
? 实体控制
- 阻止生成:阻止特定实体在维度中生成
- 全面保护:适用于自然生成、刷怪蛋和命令生成的情况
? 用户友好的 GUI
- 基于库存的配置:简单的箱子风格 GUI,用于添加限制
- 可视化界面:将物品/方块放入 GUI 中以将其添加到禁止列表中
- 自动保存:关闭 GUI 时配置会自动保存
⚙️ 灵活配置
- 基于 JSON:配置文件易于阅读和编辑
- 热重载:通过命令重新加载配置而无需重启服务器
- 权限系统:基于等级的访问控制,支持自定义权限
安装
- 下载模组 JAR 文件
- 将其放入服务器的
mods/ 文件夹中
- 确保已安装 Fabric API
- 启动/重启服务器
- 配置文件将在
config/dimensioncontrol.json 处创建
要求
- Minecraft: 1.21.4
- Fabric Loader: 0.16.9 或更高版本
- Fabric API: 0.119.4+1.21.4 或更高版本
- Java: 21 或更高版本
命令
所有命令都需要权限等级 2(管理员):
主命令
/dimensioncontrol
重新加载配置
/dimensioncontrol reload
在不重启服务器的情况下重新加载配置文件。
打开 GUI
/dimensioncontrol gui
打开库存 GUI 以配置当前维度的禁止物品。
维度管理
/dimensioncontrol dimension <dimension_id> enable
/dimensioncontrol dimension <dimension_id> disable
示例:
/dimensioncontrol dimension minecraft:the_nether disable
/dimensioncontrol dimension minecraft:the_end enable
权限管理
/dimensioncontrol permission <player> set <level>
/dimensioncontrol permission <player> get
/dimensioncontrol permission <player> remove
示例:
/dimensioncontrol permission Steve set dimensioncontrol.nether
/dimensioncontrol permission Alex get
/dimensioncontrol permission Bob remove
配置
默认配置文件 (config/dimensioncontrol.json):
{
"dimensions": {
"minecraft:overworld": {
"enabled": true,
"blockedItems": [],
"blockedBlocks": [],
"blockedEntities": [],
"allowedPermissions": []
},
"minecraft:the_nether": {
"enabled": true,
"blockedItems": ["minecraft:netherite_ingot"],
"blockedBlocks": [],
"blockedEntities": [],
"allowedPermissions": ["dimensioncontrol.nether"]
},
"minecraft:the_end": {
"enabled": true,
"blockedItems": ["minecraft:elytra"],
"blockedBlocks": [],
"blockedEntities": [],
"allowedPermissions": ["dimensioncontrol.end"]
}
},
"enablePermissionSystem": true,
"defaultPermissionLevel": "default"
}
配置选项
- enabled: 该维度是否可访问
- blockedItems: 无法获取的物品 ID 列表
- blockedBlocks: 无法破坏的方块 ID 列表
- blockedEntities: 无法生成的实体 ID 列表
- allowedPermissions: 可以访问此维度的权限等级列表
- enablePermissionSystem: 权限系统的总开关
- defaultPermissionLevel: 没有明确权限的玩家使用的默认权限等级
物品/方块 ID 格式
使用完整的标识符格式:
namespace:path
示例:
minecraft:diamond
minecraft:netherite_ingot
minecraft:elytra
minecraft:ancient_debris
modid:custom_item
实体 ID 格式
与物品相同:
namespace:entity_type
示例:
minecraft:ender_dragon
minecraft:wither
minecraft:zombie
使用示例
示例 1:禁用下界
/dimensioncontrol dimension minecraft:the_nether disable
当玩家尝试进入时,会看到:“§c此维度目前被禁用!”
示例 2:在下界中阻止获取下界合金锭
- 打开 GUI:
/dimensioncontrol gui(在下界中时)
- 将下界合金锭放入 GUI 中
- 关闭 GUI(自动保存)
任何玩家尝试拾取下界合金锭的行为都将被阻止并显示消息。
示例 3:仅 VIP 玩家可进入末地
/dimensioncontrol permission VIP_Player set dimensioncontrol.end
只有拥有 dimensioncontrol.end 权限的玩家才能进入末地。
示例 4:阻止龙生成
编辑 config/dimensioncontrol.json:
"minecraft:the_end": {
"enabled": true,
"blockedEntities": ["minecraft:ender_dragon"]
}
然后重新加载:/dimensioncontrol reload
示例 5:渐进式服务器
创建一个进度系统,玩家需要获得权限才能访问维度:
# 开始:仅主世界可访问
/dimensioncontrol dimension minecraft:the_nether disable
/dimensioncontrol dimension minecraft:the_end disable
# 授予资深玩家下界访问权限
/dimensioncontrol dimension minecraft:the_nether enable
/dimensioncontrol permission Player1 set dimensioncontrol.nether
# 授予老兵玩家末地访问权限
/dimensioncontrol dimension minecraft:the_end enable
/dimensioncontrol permission Player1 set dimensioncontrol.end
权限系统
工作原理
- 没有明确权限的玩家使用
defaultPermissionLevel(默认权限等级)
- 服务器操作员(权限等级 2+)可绕过所有限制
allowedPermissions(允许权限列表)为空的维度对所有人开放
- 设置了
allowedPermissions(允许权限列表)的维度仅允许具有相应权限等级的玩家进入
权限等级
你可以定义任意你想要的权限等级字符串。示例:
default、member、vip、admin
dimensioncontrol.nether、dimensioncontrol.end
tier1、tier2、tier3
禁用权限系统
在配置文件中将 enablePermissionSystem 设置为 false 即可完全禁用权限检查。
功能演示
当玩家尝试进入被禁用的维度时:
§c此维度当前已被禁用!
当玩家缺乏权限时:
§c你没有权限进入此维度!
当玩家拾取被阻止的物品时:
§c你无法在此维度获取此物品!
当玩家破坏被阻止的方块时:
§c你无法在此维度破坏此方块!
故障排除
配置文件未加载?
- 检查
logs/latest.log 中的错误信息
- 确保 JSON 语法有效(可使用 JSON 验证工具)
- 尝试删除配置文件并重新启动(将创建全新的默认配置)
限制未生效?
- 编辑配置文件后使用
/dimensioncontrol reload 命令重新加载
- 核实物品/方块/实体 ID 是否正确(在游戏中按 F3+H 可查看 ID)
- 确认维度 ID 匹配正确(例如应为
minecraft:the_nether,而非仅 nether)
玩家仍可访问维度?
- 操作员(权限等级 2+)设计上可绕过所有限制
- 检查
enablePermissionSystem 是否设置为 true
- 若希望完全禁止访问,请确认该维度已设置为
"enabled": false
由 DemoDev 用 ❤️ 制作
Dimension Control Mod
A powerful server-side Fabric mod for Minecraft 1.21.4 that gives administrators complete control over dimension access, item/block restrictions, and entity spawning.
Features
? Dimension Management
- Enable/Disable Dimensions: Completely block access to specific dimensions
- Permission-Based Access: Control which player ranks can enter each dimension
- Real-time Configuration: Changes apply immediately without server restart
? Item & Block Restrictions
- Block Item Obtainment: Prevent players from picking up specific items in dimensions
- Block Breaking: Restrict which blocks can be broken in each dimension
- Per-Dimension Rules: Different restrictions for Overworld, Nether, End, and custom dimensions
? Entity Control
- Spawn Prevention: Block specific entities from spawning in dimensions
- Complete Protection: Works for natural spawns, spawn eggs, and commands
? User-Friendly GUI
- Inventory-Based Configuration: Simple chest-style GUI for adding restrictions
- Visual Management: Place items/blocks in the GUI to add them to the blocked list
- Auto-Save: Configuration saves automatically when closing the GUI
⚙️ Flexible Configuration
- JSON-Based: Easy to read and edit configuration file
- Hot Reload: Reload config with a command without restarting
- Permission System: Rank-based access control with customizable permissions
Installation
- Download the mod JAR file
- Place it in your server's
mods/ folder
- Ensure you have Fabric API installed
- Start/restart your server
- Configuration file will be created at
config/dimensioncontrol.json
Requirements
- Minecraft: 1.21.4
- Fabric Loader: 0.16.9 or higher
- Fabric API: 0.119.4+1.21.4 or higher
- Java: 21 or higher
Commands
All commands require permission level 2 (operator):
Main Command
/dimensioncontrol
Reload Configuration
/dimensioncontrol reload
Reloads the configuration file without restarting the server.
Open GUI
/dimensioncontrol gui
Opens an inventory GUI to configure blocked items for your current dimension.
Dimension Management
/dimensioncontrol dimension <dimension_id> enable
/dimensioncontrol dimension <dimension_id> disable
Examples:
/dimensioncontrol dimension minecraft:the_nether disable
/dimensioncontrol dimension minecraft:the_end enable
Permission Management
/dimensioncontrol permission <player> set <level>
/dimensioncontrol permission <player> get
/dimensioncontrol permission <player> remove
Examples:
/dimensioncontrol permission Steve set dimensioncontrol.nether
/dimensioncontrol permission Alex get
/dimensioncontrol permission Bob remove
Configuration
Default configuration file (config/dimensioncontrol.json):
{
"dimensions": {
"minecraft:overworld": {
"enabled": true,
"blockedItems": [],
"blockedBlocks": [],
"blockedEntities": [],
"allowedPermissions": []
},
"minecraft:the_nether": {
"enabled": true,
"blockedItems": ["minecraft:netherite_ingot"],
"blockedBlocks": [],
"blockedEntities": [],
"allowedPermissions": ["dimensioncontrol.nether"]
},
"minecraft:the_end": {
"enabled": true,
"blockedItems": ["minecraft:elytra"],
"blockedBlocks": [],
"blockedEntities": [],
"allowedPermissions": ["dimensioncontrol.end"]
}
},
"enablePermissionSystem": true,
"defaultPermissionLevel": "default"
}
Configuration Options
- enabled: Whether the dimension is accessible
- blockedItems: List of item IDs that cannot be obtained
- blockedBlocks: List of block IDs that cannot be broken
- blockedEntities: List of entity IDs that cannot spawn
- allowedPermissions: List of permission levels that can access this dimension
- enablePermissionSystem: Global toggle for the permission system
- defaultPermissionLevel: Default permission level for players without explicit permissions
Item/Block ID Format
Use the full identifier format:
namespace:path
Examples:
minecraft:diamond
minecraft:netherite_ingot
minecraft:elytra
minecraft:ancient_debris
modid:custom_item
Entity ID Format
Same as items:
namespace:entity_type
Examples:
minecraft:ender_dragon
minecraft:wither
minecraft:zombie
Usage Examples
Example 1: Disable the Nether
/dimensioncontrol dimension minecraft:the_nether disable
Players will see: "§cThis dimension is currently disabled!" when attempting to enter.
Example 2: Block Netherite in the Nether
- Open GUI:
/dimensioncontrol gui (while in the Nether)
- Place a Netherite Ingot in the GUI
- Close the GUI (auto-saves)
Any netherite ingots players try to pick up will be blocked with a message.
Example 3: VIP-Only End Access
/dimensioncontrol permission VIP_Player set dimensioncontrol.end
Only players with the dimensioncontrol.end permission can enter the End.
Example 4: Prevent Dragon Spawning
Edit config/dimensioncontrol.json:
"minecraft:the_end": {
"enabled": true,
"blockedEntities": ["minecraft:ender_dragon"]
}
Then reload: /dimensioncontrol reload
Example 5: Progressive Server
Create a progression system where players need permissions to access dimensions:
# Start: Only Overworld accessible
/dimensioncontrol dimension minecraft:the_nether disable
/dimensioncontrol dimension minecraft:the_end disable
# Grant Nether access to established players
/dimensioncontrol dimension minecraft:the_nether enable
/dimensioncontrol permission Player1 set dimensioncontrol.nether
# Grant End access to veteran players
/dimensioncontrol dimension minecraft:the_end enable
/dimensioncontrol permission Player1 set dimensioncontrol.end
Permission System
How It Works
- Players without explicit permissions use the
defaultPermissionLevel
- Server operators (level 2+) bypass all restrictions
- Dimensions with empty
allowedPermissions are accessible to everyone
- Dimensions with
allowedPermissions only allow players with matching permission levels
Permission Levels
You can define any permission level strings you want. Examples:
default, member, vip, admin
dimensioncontrol.nether, dimensioncontrol.end
tier1, tier2, tier3
Disabling Permission System
Set enablePermissionSystem to false in the config to disable permission checks entirely.
Features in Action
When a Player Tries to Enter a Disabled Dimension:
§cThis dimension is currently disabled!
When a Player Lacks Permission:
§cYou don't have permission to enter this dimension!
When a Player Picks Up a Blocked Item:
§cYou cannot obtain this item in this dimension!
When a Player Breaks a Blocked Block:
§cYou cannot break this block in this dimension!
Troubleshooting
Config not loading?
- Check
logs/latest.log for errors
- Ensure JSON syntax is valid (use a JSON validator)
- Try deleting the config file and restarting (creates fresh default)
Restrictions not working?
- Use
/dimensioncontrol reload after editing the config
- Verify item/block/entity IDs are correct (use F3+H in-game to see IDs)
- Check that the dimension ID matches (e.g.,
minecraft:the_nether not just nether)
Players can still access dimensions?
- Operators (permission level 2+) bypass all restrictions by design
- Check if
enablePermissionSystem is set to true
- Verify the dimension is set to
"enabled": false if you want to block it entirely
Made with ❤️ by DemoDev
评论 0
登录后参与评分
还没有评论,来抢沙发吧