MapManager-Core v4
MapManager-Core 是一款面向 Paper 创造与建造服务器的地图管理插件。它负责管理地图元数据、角色及访问权限,使用 Multiverse-Core 进行世界操作,并与 LuckPerms 同步建造者权限。
v3 已停止支持。请使用 v4 以获取未来的更新和修复。
功能特性
- 创建地图、导入现有世界、初始化地图以及安全删除它们。
- 按地图组管理管理员和建造者,访客则被分配到单独的地图。
- 配置公开访问、显示名称、出生点、方块物理效果以及爆炸伤害。
- 在传送、登录、重生以及移除角色后检查访问权限。
- 当玩家传送到活跃地图时按需加载这些地图。
- 将地图和角色数据存储在 JSON 或 MySQL 中。
- 迁移 v3 的地图和角色数据。
- 从保存的恢复请求中恢复中断的世界操作,并重试待处理的 LuckPerms 同步任务。
安装
安装兼容版本的以下组件:
- Paper。
- LuckPerms。
- Multiverse-Core。
- VoidGen(在创建或导入
void 类型地图时需要)。
本项目基于 Java 21,并声明 Minecraft API 版本为 1.20。所选服务器及其依赖项也必须支持您的运行环境。
停止服务器,备份你的世界、LuckPerms 数据以及 plugins/MapManager-Core/ 目录。将 v4 插件 JAR 文件放入 plugins/ 目录,移除任何旧版的 MapManager-Core JAR 文件,然后启动服务器。
首次启动时,插件会在 plugins/MapManager-Core/ 目录下生成 config.yml 和语言文件。默认的 JSON 后端将数据存储在 maps.json 中。
如果不存在,插件会创建 LuckPerms 的 worldbase 组。现有的 worldbase 配置将被保留。
从 v3 升级
在启动 v4 之前,请保留 plugins/MapManager-Core/ 中的旧文件:
使用默认配置时,v4 会在启动期间检测这些文件,备份它们并迁移其中的数据。迁移错误会导致插件无法启用。一旦迁移完成,后续启动时不会重复执行此操作。
要在应用迁移之前预览迁移过程,请在启动 v4 之前设置 migration.dry-run: true。查看 v3-migration-report.json,然后从控制台运行 /mapadmin migration apply。
地图角色
| 角色 |
范围 |
权限说明 |
| Admin (管理员) |
地图组 |
管理组内地图的成员和设置。管理员同时也拥有建造者和访客的权限。 |
| Builder (建造者) |
地图组 |
进入组内的地图,并获得为该世界配置的 worldbase 权限。 |
| Visitor (访客) |
单独地图 |
进入指定的地图,但不获得建造者权限。 |
在创建或导入地图时,使用 group=<id> 设置地图组。同一组内的地图共享管理员和建造者;访客列表和地图设置保持独立。
公开地图允许所有玩家进入,无需创建访客授权或提供建造者权限。
MMC 角色和公开访问权限决定地图进入权限。OP 状态和 LuckPerms 的 multiverse.access.<map> 权限不能替代 MMC 角色。玩家命令不需要自定义 Bukkit 权限节点。
Multiverse 的默认世界始终允许进入。MMC 不对该世界应用地图角色、按地图的物理或爆炸设置,也不应用 worldbase 的权限投影。
配置 LuckPerms 组
worldbase
MMC 通过地图组赋予地图管理员和建造者对 worldbase 的世界特定访问权限。
添加建造者在地图内应获得的权限,例如 WorldEdit 或来自你保护插件的权限:
/lp group worldbase permission set worldedit.selection.pos true
如果缺失,worldbase 将从 default 继承创建。具体的建造权限必须由服务器管理员配置。
MapManager-Core 管理地图成员资格和访问权限。方块放置和破坏保护由你的保护插件提供。
MMC 在同步到 LuckPerms 之前保存角色更改。如果同步处于待处理状态,MMC 角色已经生效;权限队列会在后台重试并保留重启后的状态。
配置
配置存储在 plugins/MapManager-Core/config.yml 中。
以下摘录显示了主要设置:
language: zh_CN
storage:
type: json
mysql:
host: localhost
port: 3306
database: mapmanager
username: mapmanager
password: change-me
use-ssl: true
deletion:
allowed-world-name-regex: '.*_bak$'
creation:
blocked-world-name-regex: '.*_bak$'
access-control:
strict-map-entry: true
language 支持 zh_CN 和 en_US。可编辑的语言文件存储在 langs/ 中。
storage.type 支持 json 和 mysql。对于 MySQL,请先创建数据库和账户;插件会自动创建表。
- 切换现有的存储后端或 MySQL 目标需要显式的存储迁移。
strict-map-entry 启用对外部传送、登录、重生、世界变更以及角色移除的自动访问检查。禁用它并不会禁用 /world tp 或 /wtp 中的访问检查。
- 两个名称模式均匹配完整的地图名称。默认情况下,创建和导入拒绝以
_bak 结尾的名称,而删除命令仅接受该后缀。
更改配置后请重启服务器。
物理效果、爆炸效果和公开访问是按地图配置的。通过地图命令进行的更改会自动保存。
用法
从控制台或通过 RCON 创建地图并分配管理员:
/mapadmin create buildworld flat normal alias=BuildWorld group=buildteam admin=Steve
使用 admin= 添加地图组管理员。如果省略,则不分配新管理员;现有组的管理员仍然适用。
Steve 可以进入该地图:
/wtp buildworld
在地图内部,管理员可以管理成员和设置:
/world builder add Alex
/world visitor add Pat
/world setspawn
/world setname Building World
/world public true
新创建和导入的地图为私有状态,且物理效果和爆炸伤害均被禁用。运行 init 命令同样会禁用物理效果和爆炸效果,但会保留公共访问权限及角色设置。
启用物理效果或爆炸效果需要在 10 秒内确认:
/world physics true
/world physics true confirm
/world explosion true
/world explosion true confirm
禁用上述任一设置无需确认。
命令
<...> 表示必填参数,[...] 表示可选参数。
玩家命令
成员变更和设置类命令仅对当前地图生效,且需要该地图的 MMC 管理员角色。允许进入地图的玩家可查看其角色列表。
| 命令 |
描述 |
/world tp <map> |
传送至一个可访问的活动地图,必要时将其加载。 |
/wtp <map> |
/world tp 的快捷方式。 |
/world admin add|remove <player-or-UUID> |
授予或撤销地图组管理员访问权限。 |
/world builder add|remove <player-or-UUID> |
授予或撤销地图组建造者访问权限。 |
/world visitor add|remove <player-or-UUID> |
授予或撤销当前地图的访客访问权限。 |
/world admin info |
列出直接分配的管理员。 |
/world builder info |
列出直接分配的建造者。 |
/world visitor info |
列出直接分配的访客。 |
/world public [true|false|info] |
设置或查看公共访问状态。 |
/world physics [true|false|info] |
设置或查看方块物理效果。启用时需要确认。 |
/world explosion [true|false|info] |
设置或查看爆炸伤害。启用时需要确认。 |
/world setname <display-name> |
更改显示名称和 Multiverse 别名。 |
/world setspawn |
将地图出生点设置为你的当前位置。 |
/world kick <online-player> |
将同一地图中的玩家踢回 Multiverse 默认出生点。 |
控制台和 RCON 命令
这些命令仅限控制台和 RCON 使用。玩家(包括 OP)无法执行。结果和删除确认代码将写入服务器控制台。
| 命令 |
描述 |
/mapadmin create <map> [type] [environment] [options...] |
创建并初始化一张地图。 |
/mapadmin import <map> [type] [environment] [options...] |
从服务器根目录导入现有世界。 |
/mapadmin init <map> |
重新应用初始化规则到已加载的 MMC 地图。 |
/mapadmin delete <map> |
请求删除并获得一个一次性使用的六位确认码。 |
/mapadmin delete <code> |
在 10 秒内确认删除。 |
/mapadmin load <map> |
加载一个已注册的活动地图。 |
/mapadmin recover <map> |
使用保存的请求恢复创建、导入或之前已确认的删除操作。 |
/mapadmin operations |
列出未完成和失败的操作。 |
/mapadmin migration dry-run |
生成 v3 迁移预览,不导入数据。 |
/mapadmin migration apply |
应用或继续 v3 迁移。 |
/mapadmin storage export <name> |
将地图、角色和操作数据导出至 exports/<name>.json。 |
删除操作除检查配置的名称模式外,还会检查受保护的世界、在线玩家、地图状态以及目录安全性。
存储导出不能替代插件目录、世界文件和数据库的完整备份。
创建和导入选项
生成器类型:
flat: 平坦地形;默认值。
normal: 标准原版地形。
void: 虚空地形;需要 VoidGen。
支持的环境包括 normal、nether 和 the_end。默认为 normal。保留环境 sift 目前不受支持。
地图名称必须包含 4–16 个小写字母、数字、下划线或连字符。组 ID 必须包含 1–16 个相同字符,且不能为 default 或 worldbase。保留字和配置的屏蔽地图名称将被拒绝。
| 选项 |
描述 |
alias=<text> |
显示名称;默认为地图名称。 |
group=<id> |
地图组;默认为地图名称。 |
admin=<player-or-UUID> |
添加地图组管理员。 |
flat.height=<Y> |
平坦地形的绝对表面 Y 坐标。 |
seed=<number> |
世界种子。 |
structures=true|false |
是否生成结构。 |
biome=<biome> |
生成生物群系。 |
generator=<generator> |
Multiverse 生成器配置。 |
generator-settings=<settings> |
生成器设置。 |
property.<name>=<value> |
Multiverse 世界属性。 |
flat.height 仅适用于 flat 类型,且不能与 generator-settings 结合使用。它指定草地表层的绝对 Y 坐标,需在目标世界的实际高度范围内。
导入操作接受生成器类型和环境,以及 alias、group 和 admin 选项。不接受生成参数。
导入的世界必须直接位于服务器根目录下,并包含有效的 level.dat 数据。数据版本高于服务器的世界将被拒绝。现有的区块会被保留;所选的生成器和环境用于配置世界及后续生成。
/mapadmin import oldbuild normal normal group=buildteam admin=Steve
MapManager-Core v4
MapManager-Core is a map management plugin for Paper creative and building servers. It manages map metadata, roles, and access, uses Multiverse-Core for world operations, and synchronizes builder permissions with LuckPerms.
v3 is no longer supported. Please use v4 for future updates and fixes.
Features
- Create maps, import existing worlds, initialize maps, and safely delete them.
- Manage admins and builders by map group, with visitors assigned to individual maps.
- Configure public access, display names, spawn points, block physics, and explosion damage.
- Check access during teleports, login, respawn, and after role removal.
- Load active maps on demand when players teleport to them.
- Store map and role data in JSON or MySQL.
- Migrate v3 map and role data.
- Resume interrupted world operations from saved recovery requests and retry pending LuckPerms synchronization.
Installation
Install compatible versions of:
- Paper.
- LuckPerms.
- Multiverse-Core.
- VoidGen when creating or importing
void maps.
The project targets Java 21 and declares Minecraft API version 1.20. The selected server and dependencies must also support your runtime.
Stop the server and back up your worlds, LuckPerms data, and plugins/MapManager-Core/. Place the v4 plugin JAR in plugins/, remove any older MapManager-Core JAR, and start the server.
On first start, the plugin generates config.yml and language files in plugins/MapManager-Core/. The default JSON backend stores data in maps.json.
The plugin creates the LuckPerms worldbase group if it is missing. Existing worldbase configuration is preserved.
Upgrading from v3
Before starting v4, keep both old files in plugins/MapManager-Core/:
With the default configuration, v4 detects these files during startup, backs them up, and migrates their data. Migration errors prevent the plugin from enabling. Once migration is complete, subsequent starts do not repeat it.
To preview migration before applying it, set migration.dry-run: true before starting v4. Review v3-migration-report.json, then run /mapadmin migration apply from the console.
Map Roles
| Role |
Scope |
What it can do |
| Admin |
Map group |
Manage members and settings for maps in the group. Admins also have builder and visitor access. |
| Builder |
Map group |
Enter maps in the group and receive permissions configured in worldbase for those worlds. |
| Visitor |
Individual map |
Enter the assigned map without receiving builder permissions. |
Set the map group with group=<id> when creating or importing a map. Maps in the same group share admins and builders; visitor lists and map settings remain separate.
Public maps allow all players to enter without creating visitor grants or providing builder permissions.
MMC roles and public access determine map entry. OP status and LuckPerms multiverse.access.<map> permissions do not replace MMC roles. Player commands do not require custom Bukkit permission nodes.
The Multiverse default world always permits entry. MMC does not apply map roles, per-map physics or explosion settings, or worldbase permission projection to that world.
Configure LuckPerms Groups
worldbase
MMC gives map admins and builders world-specific access to worldbase through their map group.
Add permissions that builders should receive inside their maps, such as WorldEdit or permissions from your protection plugin:
/lp group worldbase permission set worldedit.selection.pos true
If missing, worldbase is created with inheritance from default. Specific building permissions must be configured by the server administrator.
MapManager-Core manages map membership and access. Block placement and breaking protection are provided by your protection plugins.
MMC saves role changes before synchronizing them with LuckPerms. If synchronization is pending, the MMC role has already taken effect; the permission queue retries in the background and survives restarts.
Configuration
Configuration is stored in plugins/MapManager-Core/config.yml.
The following excerpt shows the main settings:
language: zh_CN
storage:
type: json
mysql:
host: localhost
port: 3306
database: mapmanager
username: mapmanager
password: change-me
use-ssl: true
deletion:
allowed-world-name-regex: '.*_bak$'
creation:
blocked-world-name-regex: '.*_bak$'
access-control:
strict-map-entry: true
language supports zh_CN and en_US. Editable language files are stored in langs/.
storage.type supports json and mysql. For MySQL, create the database and account first; the plugin creates the tables.
- Switching an existing storage backend or MySQL target requires an explicit storage migration.
strict-map-entry enables automatic access checks for external teleports, login, respawn, world changes, and role removal. Disabling it does not disable access checks in /world tp or /wtp.
- Both name patterns match the entire map name. By default, creation and import reject names ending in
_bak, while the delete command only accepts that suffix.
Restart the server after changing configuration.
Physics, explosions, and public access are configured per map. Changes made through map commands are saved automatically.
Usage
Create a map and assign an admin from the console or through RCON:
/mapadmin create buildworld flat normal alias=BuildWorld group=buildteam admin=Steve
Use admin= to add a map-group admin. If omitted, no new admin is assigned; an existing group's admins still apply.
Steve can enter the map:
/wtp buildworld
While inside the map, an admin can manage members and settings:
/world builder add Alex
/world visitor add Pat
/world setspawn
/world setname Building World
/world public true
Newly created and imported maps are private, with physics and explosion damage disabled. Running init also disables physics and explosions while preserving public access and roles.
Enabling physics or explosions requires confirmation within 10 seconds:
/world physics true
/world physics true confirm
/world explosion true
/world explosion true confirm
Disabling either setting requires no confirmation.
Commands
<...> is required and [...] is optional.
Player Commands
Member changes and setting commands apply to the current map and require its MMC admin role. Players allowed to enter the map can view its role lists.
| Command |
Description |
/world tp <map> |
Teleport to an accessible active map, loading it if necessary. |
/wtp <map> |
Shortcut for /world tp. |
/world admin add|remove <player-or-UUID> |
Grant or revoke map-group admin access. |
/world builder add|remove <player-or-UUID> |
Grant or revoke map-group builder access. |
/world visitor add|remove <player-or-UUID> |
Grant or revoke visitor access to the current map. |
/world admin info |
List directly assigned admins. |
/world builder info |
List directly assigned builders. |
/world visitor info |
List directly assigned visitors. |
/world public [true|false|info] |
Set or view public access. |
/world physics [true|false|info] |
Set or view block physics. Enabling requires confirmation. |
/world explosion [true|false|info] |
Set or view explosion damage. Enabling requires confirmation. |
/world setname <display-name> |
Change the display name and Multiverse alias. |
/world setspawn |
Set the map spawn to your current position. |
/world kick <online-player> |
Send a player in the same map to the Multiverse default spawn. |
Console and RCON Commands
These commands are restricted to the console and RCON. Players, including OPs, cannot execute them. Results and deletion confirmation codes are written to the server console.
| Command |
Description |
/mapadmin create <map> [type] [environment] [options...] |
Create and initialize a map. |
/mapadmin import <map> [type] [environment] [options...] |
Import an existing world from the server root directory. |
/mapadmin init <map> |
Reapply initialization rules to a loaded MMC map. |
/mapadmin delete <map> |
Request deletion and receive a single-use six-character confirmation code. |
/mapadmin delete <code> |
Confirm deletion within 10 seconds. |
/mapadmin load <map> |
Load a registered active map. |
/mapadmin recover <map> |
Resume creation, import, or a previously confirmed deletion using its saved request. |
/mapadmin operations |
List unfinished and failed operations. |
/mapadmin migration dry-run |
Generate a v3 migration preview without importing data. |
/mapadmin migration apply |
Apply or resume v3 migration. |
/mapadmin storage export <name> |
Export map, role, and operation data to exports/<name>.json. |
Deletion checks protected worlds, online players, map state, and directory safety in addition to the configured name pattern.
Storage exports do not replace a complete backup of the plugin directory, world files, and database.
Creation and Import Options
Generator types:
flat: flat terrain; the default.
normal: standard vanilla terrain.
void: void terrain; requires VoidGen.
Supported environments are normal, nether, and the_end. The default is normal. The reserved environment sift is currently unsupported.
Map names must contain 4–16 lowercase letters, digits, underscores, or hyphens. Group IDs must contain 1–16 of the same characters and cannot be default or worldbase. Reserved and configured blocked map names are rejected.
| Option |
Description |
alias=<text> |
Display name; defaults to the map name. |
group=<id> |
Map group; defaults to the map name. |
admin=<player-or-UUID> |
Add a map-group admin. |
flat.height=<Y> |
Absolute surface Y coordinate for flat terrain. |
seed=<number> |
World seed. |
structures=true|false |
Whether to generate structures. |
biome=<biome> |
Generation biome. |
generator=<generator> |
Multiverse generator configuration. |
generator-settings=<settings> |
Generator settings. |
property.<name>=<value> |
Multiverse world property. |
flat.height is only available for flat and cannot be combined with generator-settings. It specifies the grass surface's absolute Y coordinate, within the target world's actual height range.
Import accepts generator type and environment, plus alias, group, and admin. It does not accept generation parameters.
The imported world must be directly inside the server root directory and contain valid level.dat data. Worlds with a newer data version than the server are rejected. Existing chunks are preserved; the selected generator and environment configure the world and subsequent generation.
/mapadmin import oldbuild normal normal group=buildteam admin=Steve
评论 0
登录后参与评分
还没有评论,来抢沙发吧