Phantom
Phantom 是一款针对 Paper 和 Folia 服务器的高级反 X 射线(anti-xray)插件。它在玩家合法看到该区域之前,隐藏地下地形、矿石、容器、实体、地牢、矿洞以及其他有价值信息。
与仅替换单个矿石不同,Phantom 会隐藏更深层的地形,并随着玩家深入地下自然地揭示出来。光线追踪器随后仅在玩家拥有清晰视线时显示矿石、容器和实体。这使得洞穴查找器、自由视角(freecam)、X 射线以及地下结构利用手段的效果大打折扣,同时保持正常游戏流程的流畅性。
功能
- 从配置揭示等级以上的玩家处隐藏地下地形
- 随着玩家探索自然揭示洞穴和隧道
- 基于光线追踪的矿石和容器隐藏——直到玩家眼睛获得视线,方块才会被揭示
- 基于光线追踪的实体隐藏——活体实体直到实际可见才会被揭示
- 在玩家靠近之前隐藏地牢和矿洞的刷怪室
- 可选的水晶洞(amethyst geode)隐藏功能(默认关闭)
- 可选的记忆玩家已访问过的区块功能 (
remember-visited,默认关闭)
- 发光地衣和滴水石等洞穴装饰不会阻挡光线追踪的揭示射线
- 每个世界的启用和禁用列表
- 可配置的替换方块
- 可选的权限绕过
- 可选跳过 Geyser/Floodgate 玩家
- 现有的
config.yml 文件保留其值;缺失的键将在加载时添加
- 支持 Paper 和 Folia
- 大型服务器的性能控制
推荐的 Paper 反 X 射线设置
为了获得最佳保护效果,请在启用 引擎模式 1 (Engine Mode 1) 的同时将 Phantom 与 Paper 内置的反 X 射线功能一起使用。
Paper 引擎模式 1 随机替换矿石,以便客户端无法信任原始区块数据。Phantom 则在此基础上增加了深层地形隐藏、基于光线追踪的矿石和实体揭示、结构隐蔽以及基于探索的洞穴可见性。结合两者提供的防护覆盖范围远比单独使用任一系统要强得多。
不要将 Paper 引擎模式 2 与 Phantom 一起使用。Phantom 已经处理了基于视线的逐块矿石隐藏。
安装
- 下载
Phantom-1.2.0.jar。
- 将其放入服务器的
plugins 文件夹中。
- 重启服务器。
- 在
plugins/Phantom/config.yml 中配置 Phantom。
- 使用
/phantom status 确认保护已激活。
Phantom 需要 PacketEvents 2.13.0。如果尚未安装 PacketEvents,Phantom 将尝试自动下载并加载该版本。
命令
别名:/ph
/phantom — 显示命令帮助
/phantom help — 显示命令帮助
/phantom status — 查看当前保护状态
/phantom on — 启用保护
/phantom off — 暂停保护
/phantom reload — 重新加载配置并同步在线玩家
/phantom refresh <player> — 刷新玩家的视野地形
/phantom refreshall — 刷新所有在线玩家
/phantom check [player] — 检查玩家的保护状态
/phantom worlds — 查看已配置和已加载的世界
/phantom version — 显示已安装的版本
权限
phantom.admin — 访问所有 Phantom 命令
phantom.bypass — 当 access.allow-bypass 为 true 时绕过保护
默认配置
# Phantom — 反 xray 保护
# 无需卸载插件即可切换所有功能。
enabled: true
# ---------------------------------------------------------------------------
# 深度 (Y 轴方块)
# ---------------------------------------------------------------------------
# 此 Y 轴或以下的地形会被替换为受保护客户端的填充方块。
mask-y: 16
# 此 Y 轴或以下的玩家被视为“已揭示”(无深度混淆)。
# 通常应设置在 mask-y 或以上。
clear-y: 24
# ---------------------------------------------------------------------------
# 世界
# ---------------------------------------------------------------------------
worlds:
# 启用 Phantom 保护的世界。至少需要一个世界。
enabled:
- world
# 始终禁用 Phantom 保护的世界(即使也列在 enabled 下)。
disabled:
- world_nether
- world_the_end
- spawn
# ---------------------------------------------------------------------------
# 访问控制
# ---------------------------------------------------------------------------
access:
# 当为 true 时,拥有 phantom.bypass 权限的玩家将跳过保护。
allow-bypass: true
# 跳过 Geyser/Floodgate 玩家(UUID 以 000000 开头)。
skip-bedrock-players: false
# ---------------------------------------------------------------------------
# 填充 (隐藏地形的样子)
# ---------------------------------------------------------------------------
fill:
enabled: true
# 任何固体方块材质名称(例如 DEEPSLATE, STONE, NETHERRACK)。
block: DEEPSLATE
# ---------------------------------------------------------------------------
# 结构
# ---------------------------------------------------------------------------
structures:
dungeons:
enabled: true
# 当玩家距离此远近时(方块),重新发送地牢房间数据。
reveal-distance: 6
# 附近所需的圆石/苔藓圆石数量,用于将该刷怪室视为原版地牢。
min-cobblestone: 5
# 有助于避免隐藏自定义刷怪室构建。设置为 0 则仅需圆石/箱子。
min-mossy-cobblestone: 2
amethyst-geodes:
enabled: false
# 当玩家距离此远近时(方块),重新发送水晶洞数据。
reveal-distance: 6
# 附近最少所需的水晶方块/芽以及水晶洞特征方块。
min-signature-blocks: 4
mineshafts:
enabled: true
# 当玩家距离此远近时(方块),重新发送矿洞刷怪室数据。
reveal-distance: 6
# 隐藏附近至少有这么多蜘蛛网的刷怪室。
min-cobwebs: 6
---------------------------------------------------------------------------
揭示(基于光线的洞穴/隧道可见性)
---------------------------------------------------------------------------
reveal:
多久(以刻为单位)重新评估在线玩家的可见性。
check-every-ticks: 2
当为 true 时,离开揭示区域的区块对该玩家再次隐藏。
当为 false 时,一旦揭示,在会话期间保持可见。
rehide-when-leaving: false
当为 true 时,玩家已看到的区块保持未混淆状态,并保存到 visited.sqlite。
设为 true 以记住已访问的区块。
remember-visited: false
当玩家移动距离极小时,跳过冗余的移动触发揭示工作。周期性
check-every-ticks 重试仍会因区块加载竞争而重新运行光线追踪。
optimized-movement: true
用于洞穴可见性的基础光线数量(越高 = 越密集,CPU 占用越多)。
ray-count: 64
超出计算半径以额外保持可见的区块数。
extra-chunk-radius: 3
揭示半径在区块层面的硬性上限。
max-chunk-radius: 4
当玩家在地下时,持续重新发送附近的区块。
continuous:
enabled: true
radius: 4
# 每刻每个玩家排队重新发送的最大区块数(越高 = 追赶速度越快,带宽占用越多)。
max-chunks-per-tick: 192
# 每个玩家跟踪的总揭示区块数的软上限(0 = 无限制)。
total-limit: 0
---------------------------------------------------------------------------
矿石追踪(类 RayTraceAntiXray 的单块隐藏)
---------------------------------------------------------------------------
当发送区块时,暴露于空气中的矿石和容器会被替换为石头 / 深板岩 /
下界岩 / 末地石。随后后台光线追踪器仅在玩家视线能直接看到该方块时才揭示它。
ore-trace:
enabled: true
同时追踪第三人称(F5)相机位置。CPU 占用更高。
third-person: false
超过此距离的方块将保持其上次隐藏/揭示的状态。
distance: 64.0
重新隐藏玩家不再能看到的方块。
rehide: true
在此距离或更远时,之前已揭示的方块被视为隐藏。
rehide-distance: 60.0
每个区块初始隐藏的光线追踪位置上限(自底向上)。
max-blocks-per-chunk: 100
多久(以刻为单位)重新追踪已跟踪的矿石。
update-ticks: 2
空列表使用内置的矿石 + 容器目录。
blocks: []
即使 rehide 为 true,一旦看到就保持揭示的材料。
never-rehide: []
---------------------------------------------------------------------------
实体追踪(光线追踪实体隐藏)
---------------------------------------------------------------------------
生物实体直到从玩家眼睛发出的视线清晰时才被隐藏。工作量受预算限制,
当观看者和实体都没有足够移动时则跳过工作。
entity-trace:
enabled: true
distance: 64.0
rehide: true
每刻每个玩家追踪的最大实体数。
max-per-tick: 48
hide-players: false
hide-items: false
hide-projectiles: false
---------------------------------------------------------------------------
性能
---------------------------------------------------------------------------
performance:
尽可能优先在主服务器线程之外处理数据包工作。
仅在出现异步相关错误时禁用。
async-packets: true
用于混淆/揭示工作的后台工作线程。
worker-threads: 2
## 兼容性
- Paper
- Folia
- Minecraft 1.21.x
- Java 21
- PacketEvents 2.13.0
为了获得最强的反 X 射线设置,请将 Phantom 与 **Paper Anti-Xray Engine Mode 1** 结合使用。
Phantom
Phantom is an advanced anti-xray plugin for Paper and Folia servers. It hides underground terrain, ores, containers, entities, dungeons, mineshafts, and other valuable information until players legitimately see that area.
Instead of only replacing individual ores, Phantom conceals deeper terrain and reveals it naturally as players travel underground. A ray tracer then shows ores, containers, and entities only when the player has a clear line of sight. This makes cave-finder, freecam, xray, and underground structure exploits far less useful while keeping normal gameplay smooth.
Features
- Hides underground terrain from players above the configured reveal level
- Reveals caves and tunnels naturally as players explore
- Ray-traced ore and container hiding — blocks stay hidden until the player’s eye has line of sight
- Ray-traced entity hiding — living entities stay hidden until they are actually visible
- Conceals dungeon and mineshaft spawner rooms until the player is close
- Optional amethyst geode hiding (off by default)
- Optional memory of chunks a player has already seen (
remember-visited, off by default)
- Cave decorations like glow lichen and dripstone do not seal tunnels from reveal rays
- Per-world enable and disable lists
- Configurable replacement block
- Optional permission bypass
- Optional skip for Geyser/Floodgate players
- Existing
config.yml files keep their values; missing keys are added on load
- Paper and Folia support
- Performance controls for larger servers
Recommended Paper Anti-Xray Setup
For the best protection, use Phantom alongside Paper’s built-in anti-xray with Engine Mode 1 enabled.
Paper Engine Mode 1 randomly replaces ores so clients cannot trust raw chunk data. Phantom then adds deeper terrain hiding, ray-traced ore and entity reveal, structure concealment, and exploration-based cave visibility. Using both provides much stronger coverage than either system alone.
Do not use Paper Engine Mode 2 with Phantom. Phantom already handles per-block ore hiding with line-of-sight reveal.
Installation
- Download
Phantom-1.2.0.jar.
- Place it in your server’s
plugins folder.
- Restart the server.
- Configure Phantom in
plugins/Phantom/config.yml.
- Use
/phantom status to confirm protection is active.
Phantom requires PacketEvents 2.13.0. If PacketEvents is not already installed, Phantom will attempt to download and load that version automatically.
Commands
Alias: /ph
/phantom — Show command help
/phantom help — Show command help
/phantom status — View the current protection status
/phantom on — Enable protection
/phantom off — Pause protection
/phantom reload — Reload the configuration and resync online players
/phantom refresh <player> — Refresh a player’s terrain
/phantom refreshall — Refresh all online players
/phantom check [player] — Inspect a player’s protection state
/phantom worlds — View configured and loaded worlds
/phantom version — Show the installed version
Permissions
phantom.admin — Access all Phantom commands
phantom.bypass — Bypass protection when access.allow-bypass is true
Default Configuration
# Phantom — anti-xray protection
# Toggle everything without unloading the plugin.
enabled: true
# ---------------------------------------------------------------------------
# Depth (block Y)
# ---------------------------------------------------------------------------
# Terrain at or below this Y is replaced with the fill block for protected clients.
mask-y: 16
# Players at or below this Y are treated as "revealed" (no depth obfuscation).
# Should usually be at or above mask-y.
clear-y: 24
# ---------------------------------------------------------------------------
# Worlds
# ---------------------------------------------------------------------------
worlds:
# Worlds where Phantom protection is enabled. At least one world is required.
enabled:
- world
# Worlds where Phantom protection is always disabled (even if also listed under enabled).
disabled:
- world_nether
- world_the_end
- spawn
# ---------------------------------------------------------------------------
# Access
# ---------------------------------------------------------------------------
access:
# When true, players with phantom.bypass skip protection.
allow-bypass: true
# Skip Geyser/Floodgate players (UUID starts with 000000).
skip-bedrock-players: false
# ---------------------------------------------------------------------------
# Fill (what hidden terrain looks like)
# ---------------------------------------------------------------------------
fill:
enabled: true
# Any solid block material name (e.g. DEEPSLATE, STONE, NETHERRACK).
block: DEEPSLATE
# ---------------------------------------------------------------------------
# Structures
# ---------------------------------------------------------------------------
structures:
dungeons:
enabled: true
# Resend a dungeon room when the player is this close (blocks).
reveal-distance: 6
# Nearby cobblestone/mossy cobblestone required to treat a spawner as a vanilla dungeon.
min-cobblestone: 5
# Helps avoid hiding custom spawner builds. Set 0 to only require cobblestone/chests.
min-mossy-cobblestone: 2
amethyst-geodes:
enabled: false
# Resend a geode when the player is this close (blocks).
reveal-distance: 6
# Minimum nearby amethyst blocks/buds plus geode-shell signature blocks.
min-signature-blocks: 4
mineshafts:
enabled: true
# Resend a mineshaft spawner room when the player is this close (blocks).
reveal-distance: 6
# Hide spawner rooms that have at least this many nearby cobwebs.
min-cobwebs: 6
# ---------------------------------------------------------------------------
# Reveal (ray-based cave / tunnel visibility)
# ---------------------------------------------------------------------------
reveal:
# How often (in ticks) to re-evaluate visibility for online players.
check-every-ticks: 2
# When true, chunks that leave the reveal area are hidden again for that player.
# When false, once revealed they stay visible for the session.
rehide-when-leaving: false
# When true, chunks a player has already seen stay unobfuscated and are saved to visited.sqlite.
# Set true to remember visited chunks.
remember-visited: false
# Skip redundant movement-triggered reveal work when the player barely moved. The periodic
# check-every-ticks retry still reruns the trace for chunk-loading races.
optimized-movement: true
# Base number of rays cast for cave visibility (higher = denser, more CPU).
ray-count: 64
# Extra chunks beyond the calculated radius to keep visible.
extra-chunk-radius: 3
# Hard ceiling on reveal radius in chunks.
max-chunk-radius: 4
# Continuously re-send nearby chunks while a player is underground.
continuous:
enabled: true
radius: 4
# Max chunks queued for resend per player per tick (higher = faster catch-up, more bandwidth).
max-chunks-per-tick: 192
# Soft cap on total revealed chunks tracked per player (0 = unlimited).
total-limit: 0
# ---------------------------------------------------------------------------
# Ore trace (RayTraceAntiXray-style per-block hiding)
# ---------------------------------------------------------------------------
# Air-exposed ores and containers are replaced with stone / deepslate /
# netherrack / end stone when a chunk is sent. A background ray tracer then
# reveals a block only when the player's eye has a clear line of sight to it.
ore-trace:
enabled: true
# Also trace third-person (F5) camera positions. More CPU.
third-person: false
# Blocks farther than this stay in their last hidden/revealed state.
distance: 64.0
# Re-hide blocks the player can no longer see.
rehide: true
# At or beyond this distance a previously revealed block is treated as hidden.
rehide-distance: 60.0
# Cap on initially hidden, ray-traced positions per chunk (bottom-up).
max-blocks-per-chunk: 100
# How often (in ticks) to re-trace tracked ores.
update-ticks: 2
# Empty list uses the built-in ore + container catalog.
blocks: []
# Materials that stay revealed once seen, even if rehide is true.
never-rehide: []
# ---------------------------------------------------------------------------
# Entity trace (ray-traced entity hiding)
# ---------------------------------------------------------------------------
# Living entities are hidden until a line of sight from the player's eye is
# clear. Work is budgeted and skipped when neither the viewer nor the entity
# moved enough.
entity-trace:
enabled: true
distance: 64.0
rehide: true
# Max entities traced per player per tick.
max-per-tick: 48
hide-players: false
hide-items: false
hide-projectiles: false
# ---------------------------------------------------------------------------
# Performance
# ---------------------------------------------------------------------------
performance:
# Prefer handling packet work off the main server thread when possible.
# Disable only if you hit async-related errors.
async-packets: true
# Background worker threads for obfuscation/reveal work.
worker-threads: 2
Compatibility
- Paper
- Folia
- Minecraft 1.21.x
- Java 21
- PacketEvents 2.13.0
For the strongest anti-xray setup, combine Phantom with Paper Anti-Xray Engine Mode 1.
评论 0
登录后参与评分
还没有评论,来抢沙发吧