CustomBorder
自定义方形世界边界 — 完全独立于原版 Minecraft 边界。
在世界的任意位置定义命名且持久的边界。玩家会被限制在边界内,系统会通过粒子效果、推力机制和即时执行来确保边界生效。管理员可以对绕过(bypass)、可见性和设置进行细粒度控制——所有操作均在运行时完成,无需重启服务器。
✨ 功能
- 方形边界 — 由中心点和半径(以方块为单位的半边长)定义
- 全建造高度墙壁 — 边界垂直跨度为 10,000 个方块,覆盖整个可建造范围
- 红色粒子墙 — 当玩家靠近时出现;每个玩家可以自行设置可见距离
- 推力机制 — 当玩家过于靠近墙壁时,会被推回中心方向;支持在运行时切换和调整
- 即时移动执行 — 实时拦截移动事件,防止任何穿越行为,且不会出现橡皮筋效应(rubberbanding)
- 传送回安全区 — 如果玩家意外处于边界外,会立即被移回内部
- 管理员绕过 — 管理员可以使用
/borderop 命令为自己开启边界绕过
- 管理员
/tp 支持 — 通过命令触发的传送始终可以自由穿越边界,因此管理员可以将玩家移动到任一侧
- 单人粒子开关 — 管理员(即使启用了绕过)可以为自己隐藏粒子墙
- 多边界支持 — 可以在任何世界中定义任意数量的命名边界
- 持久存储 — 所有边界都保存在
borders.yml 中,并能在服务器重启后保留
- 完全独立 — 不与原版世界边界发生任何接触或交互
- Tab 补全 — 所有命令均支持完整的 Tab 补全,包括边界名称和参数建议
?️ 命令
玩家命令
(默认:仅 OP — 可通过权限配置)
| 命令 |
描述 |
/border help |
显示所有命令及其解释,以及你的当前设置 |
/border list |
列出所有活动边界,包括名称、世界、中心和半径 |
/border info <name> |
显示特定边界的详细信息 |
/border view |
显示你当前的可见距离和服务器的默认可见距离 |
/border view <blocks> |
设置你看到红色粒子墙的距离(1–256 个方块) |
/border view reset |
将你的可见距离重置为服务器默认值 |
管理员命令
(需要 customborder.admin 权限)
| 命令 |
描述 |
/border create <name> <radius> |
在你当前位置为中心创建一个方形边界 |
/border remove <name> |
永久删除一个边界 |
/border pushback |
显示当前推力状态(启用/禁用、距离、强度) |
/border pushback on |
全局启用推力机制 |
/border pushback off |
全局禁用推力机制 |
/border pushback distance <blocks> |
设置玩家必须靠近墙壁多远才会被推开 |
/border pushback strength <value> |
设置推力的速度力(默认值:1.2) |
/border particles on |
再次为自己显示粒子墙 |
/border particles off |
为自己隐藏粒子墙(与绕过状态无关) |
/borderop on |
启用边界绕过 —— 你可以自由穿越所有边界 |
/borderop off |
禁用边界绕过 —— 边界对你再次生效 |
注意: /tp(以及任何通过命令触发的传送)始终可以自由穿越边界,允许管理员在不使用绕过的情况下将玩家移动到任一侧。
? 权限
| 权限 |
描述 |
默认值 |
customborder.use |
使用基本命令:help, list, info, view |
op |
customborder.admin |
完全控制:创建/删除边界、推力设置、粒子、绕过 |
op |
⚙️ 配置
所有设置位于 plugins/CustomBorder/config.yml:
# 红色粒子变得可见的距离(以方块为单位)(服务器全局默认值)。
# 每个玩家可以通过 /border view 单独覆盖此设置。
particle-visibility-distance: 10.0
# 推力机制是否激活。可以通过 /border pushback on|off 在运行时切换。
pushback-enabled: true
# 玩家开始被推回的墙壁距离(以方块为单位)。
pushback-distance: 3.0
# 向边界中心的推力速度强度。
pushback-strength: 1.2
# proximity check(接近检查)运行的频率(以刻为单位)。20 刻 = 1 秒。
check-interval: 5
# 每次检查渲染的每个可见墙壁的粒子点数。
particle-count: 8
# 边界墙壁的高度(以方块为单位)。10000 覆盖完整的建造范围。
border-height: 10000
所有推力设置都可以通过命令在运行时更改 —— 无需编辑文件或重启服务器。更改会立即保存。
? 工作原理
-
站在你想要设置边界的位置中心,然后运行 /border create <name> <radius>。
radius 是半边长:半径为 100 将创建一个 200 × 200 方块的区域。
- 边界是正方形、轴对齐的,并以创建时你的精确位置为中心。
-
进入其可见距离范围内的玩家会在边界边缘看到红色粒子墙。
-
在距离墙壁 pushback-distance 个方块内的玩家会持续被推回中心方向。
-
如果玩家意外处于边界外(例如通过插件传送),他们会立即被传送回内部最近的safe位置。
-
管理员可以使用 /borderop on 为自己绕过所有执行限制。完成后,使用 /borderop off 重新启用。
-
管理员可以使用标准的 /tp 命令自由地将玩家传送到边界两侧。
-
每位玩家都可以使用 /border view <blocks> 自定义他们看到粒子墙的距离,范围在 1 到 256 个方块之间。
? 数据与持久性
边界存储在 plugins/CustomBorder/borders.yml 中,并在启动时自动加载。加载的边界数量将在启用时记录:
[CustomBorder] 已从存储加载 3 个边界。
每个玩家的设置(可见距离、隐藏粒子、绕过)仅在当前会话中有效,重启后会重置——这是有意为之,因为它们被视为临时偏好。
? 要求
- 服务器: Paper 1.21.1 或兼容分支
- Java: 21 或更高版本
? 问题与源码
发现错误或想要贡献?请在 GitHub 仓库 上提交 issue 或 pull request。
CustomBorder
Custom square world borders — fully independent of the vanilla Minecraft border.
Define named, persistent borders anywhere in your world. Players are kept inside with particles, pushback, and instant enforcement. Admins get fine-grained control over bypass, visibility, and settings — all at runtime, no restart needed.
✨ Features
- Square borders — defined by a center point and a radius (half side-length in blocks)
- Full build-height wall — the border spans 10,000 blocks vertically, covering the entire playable range
- Red particle wall — appears as players approach; each player can set their own visibility distance
- Pushback mechanic — players are pushed back toward the center when too close to the wall; can be toggled and tuned at runtime
- Instant movement enforcement — movement events are intercepted in real-time, preventing any crossing without rubberbanding
- Teleport-back safety net — if a player ends up outside anyway, they are immediately moved back in
- Admin bypass — admins can toggle border enforcement for themselves with
/borderop
- Admin
/tp support — command-sourced teleports always cross borders freely, so admins can move players to either side
- Per-player particle toggle — admins (even with bypass active) can hide the particle wall for themselves
- Multiple borders — define as many named borders as needed across any world
- Persistent storage — all borders are saved to
borders.yml and survive server restarts
- Fully independent — does not touch or interact with the vanilla world border in any way
- Tab completion — all commands support full tab completion including border names and argument suggestions
?️ Commands
Player Commands
(Default: OP only — configurable via permissions)
| Command |
Description |
/border help |
Shows all commands with explanations and your current settings |
/border list |
Lists all active borders with name, world, center, and radius |
/border info <name> |
Shows detailed info about a specific border |
/border view |
Shows your current and the server-default visibility distance |
/border view <blocks> |
Sets how far away you see the red particle wall (1–256 blocks) |
/border view reset |
Resets your visibility distance to the server default |
Admin Commands
(Requires customborder.admin)
| Command |
Description |
/border create <name> <radius> |
Creates a square border centered on your current position |
/border remove <name> |
Permanently deletes a border |
/border pushback |
Shows current pushback status (enabled, distance, strength) |
/border pushback on |
Enables the pushback mechanic globally |
/border pushback off |
Disables the pushback mechanic globally |
/border pushback distance <blocks> |
Sets how close players must be before getting pushed back |
/border pushback strength <value> |
Sets the velocity force of the pushback (default: 1.2) |
/border particles on |
Shows the particle wall for yourself again |
/border particles off |
Hides the particle wall for yourself (bypass-independent) |
/borderop on |
Enables border bypass — you can freely cross all borders |
/borderop off |
Disables border bypass — borders are enforced for you again |
Note: /tp (and any command-sourced teleport) always crosses borders freely, allowing admins to move players to either side without needing bypass.
? Permissions
| Permission |
Description |
Default |
customborder.use |
Use basic commands: help, list, info, view |
op |
customborder.admin |
Full control: create/remove borders, pushback settings, particles, bypass |
op |
⚙️ Configuration
All settings in plugins/CustomBorder/config.yml:
# Distance (in blocks) at which red particles become visible (server-wide default).
# Each player can override this individually with /border view.
particle-visibility-distance: 10.0
# Whether the pushback mechanic is active. Toggleable at runtime with /border pushback on|off.
pushback-enabled: true
# Distance (in blocks) from the wall at which players start getting pushed back.
pushback-distance: 3.0
# Velocity strength of the pushback toward the border center.
pushback-strength: 1.2
# How often (in ticks) the proximity check runs. 20 ticks = 1 second.
check-interval: 5
# Number of particle points rendered per visible wall per check.
particle-count: 8
# Height of the border wall in blocks. 10000 covers the full build range.
border-height: 10000
All pushback settings can be changed at runtime via commands — no need to edit the file or restart the server. Changes are saved immediately.
? How It Works
-
Stand at the center of where you want the border, then run /border create <name> <radius>.
radius is the half side-length: a radius of 100 creates a 200 × 200 block area.
- The border is square, axis-aligned, and centered on your exact position at the time of creation.
-
Players who approach within their visibility distance see a red particle wall along the border edge.
-
Within pushback-distance blocks of the wall, players are continuously pushed back toward the center.
-
If a player somehow ends up outside (e.g. via a plugin teleport), they are immediately teleported back to the nearest safe location inside.
-
Admins can use /borderop on to bypass all enforcement for themselves. When done, /borderop off re-enables it.
-
Admins can freely teleport players across borders using the standard /tp command.
-
Every player can customize how far away they see the particle wall with /border view <blocks>, between 1 and 256 blocks.
? Data & Persistence
Borders are stored in plugins/CustomBorder/borders.yml and loaded automatically on startup. The number of loaded borders is logged on enable:
[CustomBorder] Loaded 3 border(s) from storage.
Per-player settings (visibility distance, particles hidden, bypass) are session-only and reset on restart — this is intentional, as they are considered temporary preferences.
? Requirements
- Server: Paper 1.21.1 or compatible fork
- Java: 21 or newer
? Issues & Source
Found a bug or want to contribute? Open an issue or pull request on the GitHub repository.
评论 0
登录后参与评分
还没有评论,来抢沙发吧