WorldManager – MV 替代方案
WorldManager 是一款面向 Paper 服务器的现代世界管理插件,旨在作为长期存在的 Multiverse-Core 的直接替代品并进行改进。它基于 Paper 1.21 API 和现代 Java 工具构建,提供了一个快速、安全且高度可配置的系统,用于创建、导入、管理世界以及在各个世界之间进行传送。
与遗留的世界管理器不同,WorldManager 全面支持异步操作、独立世界注册表以及可配置规则,确保了性能、可靠性和易用性。几乎所有功能都可以通过直接命令和直观的游戏中 /world GUI 访问,使其对普通管理员和高级用户同样友好。
1. 理念与目标
WorldManager 的开发旨在解决许多服务器管理员在使用 Multiverse-Core 及类似插件时遇到的常见痛点。其目标如下:
- 现代化实现:完全兼容 Paper 1.21,使用 Java 21 编写,并尽可能利用异步 API。
- 易用性:提供集中的
/world 命令,包含子命令和 GUI 选项。
- 安全第一:内置检查机制,防止数据丢失或意外删除。
- 持久化:每个世界的设置存储在
worlds.yml 中,并在世界重新加载时自动应用。
- 高可配置性:消息提示、安全检查、GUI 行数、传送预热时间、冷却时间以及各世界规则均可配置。
- 可扩展性:模块化设计、备份功能和迁移工具确保插件可以在不破坏现有世界的情况下持续演进。
简而言之:WorldManager 旨在成为 Multiverse-Core 的无缝替代方案,使其在现代 Paper 服务器上感觉如同原生一般。
2. 核心功能
2.1 世界生命周期管理
WorldManager 提供了对世界生命周期每个阶段的完整控制。
- 创建世界:通过
/world create <name> [env] 即时生成新世界。支持 NORMAL、NETHER 和 THE_END 环境,以及种子、结构和自定义生成器等可选参数。
- 导入世界:使用
/world import <folder> 将现有的世界文件夹引入服务器。该过程是异步进行的,提供进度百分比和预计完成时间(ETA)更新,以防止卡顿。
- 卸载世界:通过
/world unload <world> 释放服务器内存。在卸载前会进行安全检查,确保没有玩家身处其中。
- 删除世界:通过
/world delete <world> 永久从磁盘移除世界文件夹。要求世界必须先处于卸载状态。
- 备份与迁移:自动为
worlds.yml 创建带时间戳的备份,并提供 /world migrate 命令以安全地更新架构。
2.2 传送与导航
传送是世界管理的重要组成部分,WorldManager 使其变得无缝流畅。
- 传送命令:
/world tp [player] <world> 将你或其他玩家直接传送到目标世界的出生点。
- 返回命令:
/world back 将你送回之前的位置,并与当前位置互换。
- 历史命令:
/world history 列出之前的传送位置,以便快速参考。
- 传送选项:预热计时器、冷却时间和移动取消功能均完全可配置。
2.3 世界 GUI
所有世界操作均可通过在游戏中打开的库存 GUI 访问,使用 /world gui 即可开启。
- 通过图标、玩家数量和环境影响浏览已加载的世界。
- 使用
/world fav add <world> 收藏世界,然后在 GUI 中快速访问它们。
- 只需单击即可直接从 GUI 进行传送。
config.yml 中可配置的 GUI 行数确保其能根据世界数量进行扩展。
2.4 独立世界设置与强制执行
每个世界都可以定制特定的规则,并由插件自动强制执行。
- 游戏规则:保留物品栏、随机刻速度、自然再生、生物破坏、火焰蔓延、实体拥挤上限等。
- 世界规则:游戏模式、难度、PvP、出生点位置、时间锁定、天气锁定、保持出生点区块加载。
- 生物白名单:限制哪些生物可以在特定世界中自然生成。
更改可通过 /world config <world> <key> <value> 即时应用,并持久保存到 worlds.yml 中。
3. 命令
所有命令均注册在 /world(或别名 /wm)下。以下是所有已实现的子命令列表:
| 命令 |
描述 |
权限 |
|
|
/world list |
列出所有已加载的世界及其玩家数量 |
worldmanager.list |
|
|
/world info <world> |
显示某个世界的设置 |
worldmanager.info |
|
|
/world tp [player] <world> |
将自己或另一名玩家传送到世界出生点 |
worldmanager.tp / worldmanager.tp.others |
|
|
/world back |
返回到之前的位置 |
worldmanager.back |
|
|
/world history |
查看传送历史记录 |
worldmanager.history |
|
|
/world gui |
打开世界选择器图形界面 |
worldmanager.gui |
|
|
/world fav <add|remove|list> [world] |
管理世界收藏 |
worldmanager.favorites |
|
|
/world create <name> [env] |
创建新世界 |
worldmanager.create |
|
|
/world import <folder> [env] |
异步导入一个世界文件夹 |
worldmanager.import |
|
|
/world unload <world> [save:true|false] |
安全卸载一个世界 |
worldmanager.unload |
|
|
/world delete <world> |
删除一个已卸载的世界文件夹 |
worldmanager.delete |
|
|
/world setspawn <world> |
设置世界的出生点 |
worldmanager.setspawn |
|
|
/world config <world> <key> <value> |
更新单个世界的配置 |
worldmanager.config |
|
|
/world config <world> allowed-mobs ... |
管理允许生成的生物列表 |
worldmanager.config |
|
|
/world migrate [force] |
备份并重写 worlds.yml |
worldmanager.migrate |
|
|
4. 权限
WorldManager 采用细粒度的权限系统,允许你精确控制哪些玩家可以访问特定命令。
也可以通过 worldmanager.access.<world> 为每个世界定义自定义访问权限。
5. 配置
5.1 config.yml
主配置文件处理以下内容:
-
消息:所有消息均可使用颜色代码进行自定义。
-
选项:
prevent_unload_with_players – 如果存在玩家则阻止卸载世界。
tp_warmup_seconds, tp_cooldown_seconds, tp_cancel_on_move – 传送相关选项。
gui_rows – GUI 中的行数。
tp_history_max – 存储的传送历史记录条目数量。
backup_worlds_on_save – 启用 worlds.yml 的自动备份。
autoload_registered_worlds – 在服务器启动时自动加载已注册的世界。
5.2 worlds.yml
此文件作为所有受管世界的持久化注册表。每个世界条目包含:
- 别名
- 游戏模式
- 难度
- PvP
- 出生点
- 保持出生点加载
- 时间/天气锁定
- 允许的生物
- 基于 GameRule 的属性
在重新加载或启动时,这些规则会自动应用到对应世界中。
6. 使用示例
- 创建新世界
/world create survival NORMAL
创建一个名为 “survival” 的新主世界(Overworld)。
- 导入现有世界
/world import SkyLands NORMAL
从服务器文件夹中异步导入 SkyLands,并在聊天中显示进度和预计完成时间(ETA)。
- 传送玩家
/world tp Steve SkyLands
将玩家 Steve 传送到 SkyLands 的出生点。
- 锁定世界时间
/world config SkyLands lock-time true
/world config SkyLands time day
将 SkyLands 的时间锁定为白天。
- 管理生物生成
/world config SkyLands allowed-mobs add ZOMBIE
/world config SkyLands allowed-mobs remove CREEPER
允许僵尸在 SkyLands 中生成,但阻止苦力怕生成。
7. 安全性与可靠性
WorldManager 强调服务器安全:
- 如果玩家仍在世界内,则无法卸载该世界(除非覆盖此行为)。
- 删除世界前必须先将其卸载。
- 每当
worlds.yml 发生变化时,都会自动创建备份。
- 迁移工具可确保你的世界注册表始终保持最新。
8. 开发者挂钩
对于开发者而言,WorldManager 会将自己注册为一个服务,从而允许通过 Bukkit 的服务管理器进行集成。插件可以接入以下功能:
- 世界传送事件(可取消)。
- 世界生命周期事件(创建、导入、卸载、删除)。
- 注册表 API,用于查询已管理的世界。
9. 为什么选择 WorldManager?
WorldManager 将 Multiverse-Core 的最佳特性与现代创新相结合:
- 异步世界操作以防止卡顿。
- 持久化的按世界注册表,并自动强制执行。
- 支持 GUI,便于导航。
- 细粒度的权限控制,实现更好的服务器管理。
- 针对 Paper 优化,而不仅限于 Bukkit/Spigot。
它是一个完整的世界管理解决方案,既兼顾了休闲管理员所需的简洁性,也满足了高级服务器运营者对深度的需求。
WorldManager – MV Alternative
WorldManager is a modern world management plugin for Paper servers, designed as a direct replacement and improvement over the long-standing Multiverse-Core. Built with the Paper 1.21 API and modern Java tooling, it provides a fast, safe, and highly configurable system for creating, importing, managing, and teleporting between worlds.
Unlike legacy world managers, WorldManager fully embraces asynchronous operations, per-world registries, and configurable rules, ensuring performance, reliability, and ease of use. Nearly every feature is accessible through both direct commands and an intuitive in-game /world GUI, making it just as friendly for casual admins as for power users.
1. Philosophy and Goals
WorldManager was developed to solve the common frustrations that many server administrators encounter with Multiverse-Core and similar plugins. The goals are:
- Modern Implementation: Fully Paper 1.21 compatible, written with Java 21, and leveraging async APIs where possible.
- Ease of Use: Centralized
/world command with subcommands and GUI options.
- Safety First: Built-in checks to prevent data loss or accidental deletions.
- Persistence: Per-world settings stored in
worlds.yml and reapplied automatically when worlds are reloaded.
- Configurability: Messages, safety checks, GUI rows, teleport warmups, cooldowns, and per-world rules are all configurable.
- Extensibility: Modular design, backups, and migration tools ensure the plugin can evolve without breaking worlds.
In short: WorldManager is designed to be a drop-in alternative to Multiverse-Core that feels native to modern Paper servers.
2. Core Features
2.1 World Lifecycle Management
WorldManager provides complete control over every stage of a world’s lifecycle.
- Create Worlds: Instantly generate new worlds with
/world create <name> [env]. Supports NORMAL, NETHER, and THE_END environments, plus optional parameters for seed, structures, and custom generators.
- Import Worlds: Use
/world import <folder> to bring existing world folders into the server. The process is asynchronous, providing progress percentages and ETA updates to prevent lag.
- Unload Worlds: Free up server memory with
/world unload <world>. Safety checks ensure no players are inside before unloading.
- Delete Worlds: Permanently remove world folders from disk with
/world delete <world>. Requires the world to be unloaded first.
- Backups and Migration: Automatically creates timestamped backups of
worlds.yml and offers /world migrate to update the schema safely.
2.2 Teleportation and Navigation
Teleportation is a major component of world management, and WorldManager makes it seamless.
- Teleport Command:
/world tp [player] <world> teleports you or another player directly to the spawn of a target world.
- Back Command:
/world back returns you to your previous location, swapping places with your current one.
- History Command:
/world history lists previous teleport locations for quick reference.
- Teleport Options: Warmup timers, cooldowns, and movement cancellation are fully configurable.
2.3 World GUI
All world operations are accessible through an in-game inventory GUI opened with /world gui.
- Browse loaded worlds with icons, player counts, and environments.
- Favorite worlds with
/world fav add <world>, then access them quickly in the GUI.
- Teleport directly from the GUI with a single click.
- Configurable row size in
config.yml ensures the GUI scales to the number of worlds.
2.4 Per-World Settings and Enforcement
Each world can be customized with specific rules, enforced automatically by the plugin.
- GameRules: Keep-inventory, random-tick speed, natural regeneration, mob griefing, fire tick, max entity cramming, and more.
- World Rules: Gamemode, difficulty, PvP, spawn location, time lock, weather lock, keep-spawn-loaded.
- Mob Allowlist: Restrict which mobs can spawn naturally in a given world.
Changes are applied instantly with /world config <world> <key> <value> and persisted in worlds.yml.
3. Commands
All commands are registered under /world (or alias /wm). Below is the full list of implemented subcommands:
| Command |
Description |
Permission |
|
|
/world list |
Lists all loaded worlds with player counts |
worldmanager.list |
|
|
/world info <world> |
Displays settings for a world |
worldmanager.info |
|
|
/world tp [player] <world> |
Teleport self or another player to world spawn |
worldmanager.tp / worldmanager.tp.others |
|
|
/world back |
Return to your previous location |
worldmanager.back |
|
|
/world history |
View teleport history |
worldmanager.history |
|
|
/world gui |
Open the world selector GUI |
worldmanager.gui |
|
|
| `/world fav <add |
remove |
list> [world]` |
Manage world favorites |
worldmanager.favorites |
/world create <name> [env] |
Create a new world |
worldmanager.create |
|
|
/world import <folder> [env] |
Asynchronously import a world folder |
worldmanager.import |
|
|
| `/world unload <world> [save:true |
false]` |
Unload a world safely |
worldmanager.unload |
|
/world delete <world> |
Delete an unloaded world folder |
worldmanager.delete |
|
|
/world setspawn <world> |
Set spawn for a world |
worldmanager.setspawn |
|
|
/world config <world> <key> <value> |
Update per-world configuration |
worldmanager.config |
|
|
/world config <world> allowed-mobs ... |
Manage allowed mob list |
worldmanager.config |
|
|
/world migrate [force] |
Backup and rewrite worlds.yml |
worldmanager.migrate |
|
|
4. Permissions
WorldManager uses a granular permission system, allowing you to fine-tune which players can access specific commands.
Custom access can also be defined per-world via worldmanager.access.<world>.
5. Configuration
5.1 config.yml
The main configuration file handles:
5.2 worlds.yml
This file acts as the persistent registry for all managed worlds. Each world entry includes:
- Alias
- Gamemode
- Difficulty
- PvP
- Spawn
- Keep-spawn-loaded
- Time/weather lock
- Allowed mobs
- GameRule-backed properties
On reload or startup, these rules are automatically applied to the world.
6. Example Usage
- Creating a new world
/world create survival NORMAL
Creates a new Overworld called “survival”.
- Importing an existing world
/world import SkyLands NORMAL
Asynchronously imports SkyLands from the server folder, with progress and ETA shown in chat.
- Teleporting a player
/world tp Steve SkyLands
Teleports player Steve to the spawn of SkyLands.
- Locking time in a world
/world config SkyLands lock-time true
/world config SkyLands time day
Locks the time of SkyLands to day.
- Managing mob spawns
/world config SkyLands allowed-mobs add ZOMBIE
/world config SkyLands allowed-mobs remove CREEPER
Allows Zombies but prevents Creepers from spawning in SkyLands.
7. Safety and Reliability
WorldManager emphasizes server safety:
- Worlds cannot be unloaded if players are still inside (unless overridden).
- Deleting a world requires it to be unloaded first.
- Automatic backups are created whenever
worlds.yml changes.
- Migration tools ensure your world registry is always up to date.
8. Developer Hooks
For developers, WorldManager registers itself as a service, allowing integrations through Bukkit’s service manager. Plugins can hook into:
- World teleport events (cancellable).
- World lifecycle events (create, import, unload, delete).
- Registry API for querying managed worlds.
9. Why Choose WorldManager?
WorldManager combines the best of Multiverse-Core’s features with modern innovations:
- Asynchronous world operations to prevent lag.
- Persistent per-world registry with automatic enforcement.
- GUI support for ease of navigation.
- Granular permissions for better server control.
- Optimized for Paper, not just Bukkit/Spigot.
It’s a complete world management solution that balances simplicity for casual admins with depth for advanced server operators.
评论 0
登录后参与评分
还没有评论,来抢沙发吧