区域
此插件允许服务器管理员和玩家在其 Minecraft 世界中创建和管理受保护的区域。它提供了一个灵活的体系来定义区域、设置权限并控制这些区域内的交互行为。
功能
- 区域创建: 使用游戏内选择或手动坐标创建区域。
- 子区域: 在现有区域内创建子区域,以实现更精细的控制。
- 权限管理: 为区域内的玩家设置详细的权限,控制破坏、放置、交互等操作。
- 成员管理: 添加和移除具有特定权限的区域成员。
- 区域重叠控制: 配置区域是否允许重叠。
- 绕过权限: 允许特定玩家绕过区域限制。
- 配置: 通过配置文件自定义消息和区域设置。
- 信标可视化: 使用临时信标可视化选定的区域。
命令
该插件提供以下命令:
-
/zone create:使用当前选定的位置创建新区域。- 用法:
/zone create - 需要使用左键和右键选择两个位置,如果未选择则开始选择。
- 如果新区域会与现有区域重叠,则禁止创建,除非设置了
zones.create.overlap权限。
- 用法:
-
/zone subcreate:使用当前选定的位置在现有区域内创建新的子区域。- 用法:
/zone subcreate [regionKey] regionKey是可选的,如果未提供,将使用玩家所在位置的区域。- 需要使用左键和右键选择两个位置,如果未选择则开始选择。
- 玩家需要在该区域被视为管理员,或者拥有
zones.subcreate.other权限
- 用法:
-
/zone delete:删除现有区域。- 用法:
/zone delete <regionKey> - 需要提供要删除区域的
regionKey。 - 玩家需要是该区域的拥有者,或者拥有
zones.delete.other权限
- 用法:
-
/zone expand:按指定数量扩展现有区域。- 用法:
/zone expand <regionKey> <amount> [overlap] - 玩家需要是该区域的管理员,或者拥有
zones.expand.other权限 - 如果
overlap设置为true且玩家拥有zones.expand.overlap权限, - 即使区域与其他区域重叠,也将进行扩展。
- 用法:
-
/zone info:显示区域信息。- 用法:
/zone info [regionKey] - 如果未提供
regionKey,将使用玩家所在位置的区域。 - 要显示区域成员,玩家需要是该区域的管理员,或者拥有
zones.info.other权限
- 用法:
-
/zone list:列出玩家所属的所有区域。- 用法:
/zone list - 仅显示玩家所属的区域,除非玩家拥有
zones.list.other权限
- 用法:
-
/zone cancel:取消当前的区域选择。- 用法:
/zone cancel
- 用法:
-
/zone set:设置区域成员的权限。- 用法:
/zone set <regionKey> <who> <permission> <value> <regionKey>是区域的键。<who>为谁设置权限。- 例如,
Player1- 要创建或修改组,请使用+group-GROUPNAME,其中 GROUPNAME 可以是任何名称。
- 例如,
<permission>是要设置的权限(例如role、break、place、interact)。<value>是要设置的权限值(- 例如
owner、true、false、*、!*、GRASS_BLOCK、!GRASS_BLOCK)。
- 例如
- 用法:
-
/zone rename:重命名区域。- 用法:
/zone rename <regionKey> <newName> <regionKey>是区域的键,<newName>是区域的新名称。- 玩家需要是该区域的管理员,或者拥有
zones.rename.other权限
- 用法:
-
/zone select:选择一个区域。- 用法:
/zone select [regionKey] - 如果未提供
regionKey,将使用玩家所在位置的区域。 - 使用粒子在世界中视觉上高亮显示该区域。
- 玩家需要是该区域的成员,或者拥有
zones.select.other权限
- 用法:
-
/zone mode:更改选择模式。- 用法:
/zone mode <mode> <mode>是要为玩家设置的新模式。- 例如,
3d表示 3D 选择模式,2d表示 2D 选择模式。
- 例如,
- 用法:
-
/zone save:手动将所有区域保存到文件。- 用法:
/zone save - 仅限管理员,需要
zones.save权限(默认不授予)
- 用法:
-
/zone load:手动从文件加载所有区域。- 用法:
/zone load - 仅限管理员,需要
zones.load权限(默认不授予)
- 用法:
-
/zone import:从其他插件导入区域。- 用法:
/zone import <pluginName> - 目前仅支持 WorldGuard。
- 仅限管理员,需要
zones.import权限(默认不授予)
- 用法:
用法
创建区域
- 使用
/zone create命令开始创建过程。 - 对方块使用左键单击以设置区域的第一个角。将出现一个绿色信标。
- 对方块使用右键单击以设置区域的第二个角。将出现一个红色信标。
- 使用
/zone create命令创建区域。
创建子区域
- 使用
/zone subcreate命令开始创建过程。 - 如上所述选择子区域的两个角。
- 使用
/zone subcreate命令在你所在的区域内创建子区域, 或使用/zone subcreate <regionKey>在指定区域内创建子区域。
设置权限
- 使用
/zone set <regionKey> <player> <permission> <value>命令为区域成员设置权限。
- 示例:
/zone set <key> Player1 break true允许 “Player1” 在指定区域内破坏方块。 - 示例:
/zone set <key> Player2 break GRASS_BLOCK允许 “Player2” 仅在指定区域内破坏GRASS_BLOCK方块。 - 示例:
/zone set <key> Player3 interact !OAK_DOOR禁止 “Player3” 在指定区域内与OAK_DOOR进行交互。 - 示例:
/zone set <key> Player4 place *允许 “Player4” 在指定区域内放置所有方块。 - 示例:
/zone set <key> Player5 break !*禁止 “Player5” 在指定区域内破坏任何方块。 - 组(Groups):
- 要分配组,请将权限
group的值设置为组名。 - 例如:创建一个组并分配权限:
/zone set <regionKey> +group-some-group-name break true - 例如:
/zone set <regionKey> ExamplePlayer group some-group-name - 现在 ExamplePlayer 继承自组
some-group-name的break权限
- 要分配组,请将权限
查看区域信息
- 使用
/zone info命令查看你当前所在区域的信息。 - 使用
/zone info <regionKey>命令查看特定区域的信息。
集成支持
WorldGuard
Zones 支持通过 /zone import WorldGuard 命令导入 WorldGuard 区域。要使用此功能,必须安装并启用 WorldGuard。Zones 将自动导入所有矩形区域(Cuboid regions),包括其成员。
WorldEdit
仅当执行该操作的玩家被允许手动修改区域时,才可使用 WorldEdit 来修改区域内的方块。
PlaceholderAPI
Zones 提供了多个占位符,可与 PlaceholderAPI 插件配合使用,显示玩家当前所在区域的信息。目前支持以下占位符:
%zones_get_name%%zones_get_key%%zones_get_members%%zones_get_owner%%zones_get_min%%zones_get_min_x%%zones_get_min_y%%zones_get_min_z%%zones_get_max%%zones_get_max_x%%zones_get_max_y%%zones_get_max_z%%zones_is_member%%zones_can_place_hand%%zones_can_break_target%%zones_can_<action>_<type>%
设计选择
- YAML 配置: 该插件使用 YAML 文件进行配置和存储,便于阅读和修改。后续版本计划增加其他存储选项。
- 权限系统: 权限系统设计灵活且细致,允许对玩家交互进行精细控制。
- 事件驱动: 该插件使用 Bukkit 的事件系统来处理玩家交互,从而高效且响应迅速。
- 缓存机制: 该插件使用缓存系统在检查权限时提升性能。
贡献指南
欢迎为该插件做出贡献!如果你有任何新功能、漏洞修复或改进的想法,请随时提交拉取请求(pull request)或创建问题(issue)。
许可证
本插件基于 MIT License 分发。
Zones
This plugin allows server administrators and players to create and manage protected regions within their Minecraft world. It provides a flexible system for defining areas, setting permissions, and controlling interactions within those areas.
Features
- Region Creation: Create regions using in-game selection or manual coordinates.
- Sub-Regions: Create sub-regions within existing regions for more granular control.
- Permission Management: Set detailed permissions for players within regions, controlling actions like breaking, placing, interacting, and more.
- Member Management: Add and remove members from regions with specific permissions.
- Region Overlap Control: Configure whether regions can overlap.
- Bypass Permissions: Allow specific players to bypass region restrictions.
- Configuration: Customize messages and region settings through configuration files.
- Beacon Visualization: Visualize selected regions using temporary beacons.
Commands
The plugin provides the following commands:
-
/zone create: Creates a new region using the currently selected locations.- Usage:
/zone create - Requires two locations to be selected using left and right click, starts selection if not present.
- Prevents creation if the new region would overlap an existing region, unless the
zones.create.overlappermission is set.
- Usage:
-
/zone subcreate: Creates a new sub-region within an existing region using the currently selected locations.- Usage:
/zone subcreate [regionKey] regionKeyis optional, if not provided, the region at the player's location will be used.- Requires two locations to be selected using left and right click, starts selection if not present.
- Player needs to be considered an admin in the region, or have the
zones.subcreate.otherpermission
- Usage:
-
/zone delete: Deletes an existing region.- Usage:
/zone delete <regionKey> - Requires the
regionKeyof the region to be deleted. - Player needs to be the owner of the region, or have the
zones.delete.otherpermission
- Usage:
-
/zone expand: Expands an existing region by a specified amount.- Usage:
/zone expand <regionKey> <amount> [overlap] - Player needs to be an admin of the region, or have the
zones.expand.otherpermission - If
overlapis set totrueand the player has thezones.expand.overlappermission, - the region will be expanded even if it overlaps with other regions.
- Usage:
-
/zone info: Displays information about a region.- Usage:
/zone info [regionKey] - If
regionKeyis not provided, the region at the player's location will be used. - To show region members, the player needs to be an admin of the region, or have the
zones.info.otherpermission
- Usage:
-
/zone list: Lists all regions the player is a member of.- Usage:
/zone list - Only shows regions the player is a member of, unless the player has the
zones.list.otherpermission
- Usage:
-
/zone cancel: Cancels the current region selection.- Usage:
/zone cancel
- Usage:
-
/zone set: Sets a permission for a member of a region.- Usage:
/zone set <regionKey> <who> <permission> <value> <regionKey>is the key of the region.<who>who to set the permission for.- e.g.,
Player1- to create or modify a group, use+group-GROUPNAME, where GROUPNAME can be any name.
- e.g.,
<permission>is the permission to set (e.g.,role,break,place,interact).<value>is the value to set for the permission (- e.g.,
owner,true,false,*,!*,GRASS_BLOCK,!GRASS_BLOCK).
- e.g.,
- Usage:
-
/zone rename: Renames a region.- Usage:
/zone rename <regionKey> <newName> <regionKey>is the key of the region,<newName>is the new name of the region.- Player needs to be an admin of the region, or have the
zones.rename.otherpermission
- Usage:
-
/zone select: Selects a region.- Usage:
/zone select [regionKey] - If
regionKeyis not provided, the region at the player's location will be used. - Visually highlights the region in the world using particles.
- Player needs to be a member of the region, or have the
zones.select.otherpermission
- Usage:
-
/zone mode: Changes the selection mode.- Usage:
/zone mode <mode> <mode>is the new mode to set the player to.- e.g.,
3dfor 3D selection mode,2dfor 2D selection mode.
- e.g.,
- Usage:
-
/zone save: Manually saves all regions to file.- Usage:
/zone save - Admin only, requires the
zones.savepermission (not given by default)
- Usage:
-
/zone load: Manually loads all regions from file.- Usage:
/zone load - Admin only, requires the
zones.loadpermission (not given by default)
- Usage:
-
/zone import: Imports regions from another plugin.- Usage:
/zone import <pluginName> - Currently only supports WorldGuard.
- Admin only, requires the
zones.importpermission (not given by default)
- Usage:
Usage
Creating a Region
- Use the
/zone createcommand to start the creation process. - Use left-click on a block to set the first corner of the region. A green beacon will appear.
- Use right-click on a block to set the second corner of the region. A red beacon will appear.
- Use the
/zone createcommand to create the region.
Creating a Sub-Region
- Use the
/zone subcreatecommand to start the creation process. - Select the two corners of the sub-region as described above.
- Use the
/zone subcreatecommand to create the sub-region within the region you are standing in or use/zone subcreate <regionKey>to create a sub-region within the specified region.
Setting Permissions
- Use the
/zone set <regionKey> <player> <permission> <value>command to set permissions for a member of a region.
- Example:
/zone set <key> Player1 break trueallows "Player1" to break blocks in the specified region. - Example:
/zone set <key> Player2 break GRASS_BLOCKallows "Player2" to break onlyGRASS_BLOCKblocks in the specified region. - Example:
/zone set <key> Player3 interact !OAK_DOORdenies "Player3" to interact withOAK_DOORin the specified region. - Example:
/zone set <key> Player4 place *allows "Player4" to place all blocks in the specified region. - Example:
/zone set <key> Player5 break !*denies "Player5" to break all blocks in the specified region. - Groups:
- To assign a group, set the value of the permission
groupto the group name. - e.g.: Create a group and assign permission:
/zone set <regionKey> +group-some-group-name break true - e.g.
/zone set <regionKey> ExamplePlayer group some-group-name - ExamplePlayer now inherits the permission
breakfrom the groupsome-group-name
- To assign a group, set the value of the permission
Viewing Region Information
- Use the
/zone infocommand to view information about the region you are standing in. - Use the
/zone info <regionKey>command to view information about a specific region.
Integrations
WorldGuard
Zones supports importing WorldGuard regions via the /zone import WorldGuard command. To use this feature,
you must have WorldGuard installed and enabled. Zones will automatically import all Cuboid regions, including
their members.
WorldEdit
WorldEdit can only be used to modify blocks in a region if the executing player would be allowed to manually modify the region.
PlaceholderAPI
Zones provides multiple placeholders for use with the PlaceholderAPI plugin, displaying region information for the region the player is standing in. It currently supports the following placeholders:
%zones_get_name%%zones_get_key%%zones_get_members%%zones_get_owner%%zones_get_min%%zones_get_min_x%%zones_get_min_y%%zones_get_min_z%%zones_get_max%%zones_get_max_x%%zones_get_max_y%%zones_get_max_z%%zones_is_member%%zones_can_place_hand%%zones_can_break_target%%zones_can_<action>_<type>%
Design Choices
- YAML Configuration: The plugin uses YAML files for configuration and storage, making it easy to read and modify. Additional storage options are planned for future releases.
- Permission System: The permission system is designed to be flexible and granular, allowing for fine-grained control over player interactions.
- Event-Driven: The plugin uses Bukkit's event system to handle player interactions, making it efficient and responsive.
- Caching: The plugin uses a caching system to improve performance when checking permissions.
Contributing
Contributions to the plugin are welcome! If you have any ideas for new features, bug fixes, or improvements, please feel free to submit a pull request or open an issue.
License
This plugin is distributed under the MIT License.
下载 Zones
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Zones
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Zones
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Zones
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Zones
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Zones
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Zones
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Zones
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Zones
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Zones
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
预发布版本——你必须删除你的区域存储,格式已更改
提升性能、用户界面/用户体验、开发体验以及跨平台集成
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
使床在所有维度中爆炸的模组
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
自定义你的Minecraft头像!
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
评论 0
登录后参与评分
还没有评论,来抢沙发吧