UnseenLight 是一款 Minecraft Paper 插件,为生存模式添加了可制作的隐形光源:
玩家在工作台中合成原版光方块(minecraft:light),将其放置在任意黑暗处,右键点击即可收回。无需命令、创造模式或资源包,即可为建筑、农场和防刷怪设施提供隐蔽照明。
合成配方
8 个玻璃板 + 1 个火把 -> 1 个隐形光源(亮度等级 15)。
配方的形状、材料、产出量和光照等级均可配置。加入游戏时,配方会显示在配方书中(也可配置)。
使用方法
| 操作 |
方法 |
| 放置 |
手持光源物品,右键点击任意黑暗处——纯原版放置方式 |
| 移除 |
手持任意方块,右键点击光源所在的位置;光源会以物品形式弹出,而不是放置你手中的方块 |
| 移除箱子/门后的光源 |
潜行 + 右键点击(直接右键点击会打开容器,如同原版一样) |
| 查看已放置的光源 |
手持光源物品——原版渲染器会显示它们——或运行 /ul show 以粒子高亮显示 |
光源方块是隐形的且没有碰撞箱,因此你的准星会穿过它;瞄准时,确保你“放置”的方块落在光源的位置上。
插件防护机制
minecraft:light 是可被替换的,因此在原版中几乎任何操作都会无声地覆盖它。UnseenLight 拦截了所有此类路径——光源要么正确弹出(检查权限、查询领地保护、返还物品),要么受到保护:
- 在任何游戏模式下,用主手或副手将方块放置到光源所在位置;
- 岩浆桶和粉雪桶(水只会使光源湿润,不会破坏它);
- 掉落物方块落在该位置(物品会得到补偿);
- 原版在手持光源物品时的破坏行为(光源没有掉落表——尊重掉落模式);
- Crafter 方块无人权限检查的情况下合成此配方(可选,
recipe.allow-crafter);
/minecraft:reload 清除插件配方(配方会自动重新注册)。
领地保护插件(WorldGuard、GriefPrevention 等)会在移除任何光源前通过 BlockBreakEvent 进行查询,CoreProtect 风格的日志记录器也能看到移除记录。
命令
别名:/ul
| 命令 |
描述 |
权限(默认) |
/unseenlight reload |
重载 config.yml |
unseenlight.command.reload (op) |
/unseenlight give <players> [level] [amount] |
给予光源物品 |
unseenlight.command.give (op) |
/unseenlight show |
使用粒子高亮附近的光源 |
unseenlight.command.show (所有人) |
权限
| 节点 |
默认值 |
授予权限 |
unseenlight.craft |
true |
合成此配方(并在配方书中查看) |
unseenlight.place |
true |
放置光源方块 |
unseenlight.remove |
true |
取下已放置的光源 |
配置
所有内容都位于 config.yml 中:配方(形状、材料、产出量、光照等级 0-15)、放置/移除的声音和粒子、高亮器(半径、持续时间),以及所有玩家消息(采用 MiniMessage 格式)。
最重要的开关决定了移除光源后的处理方式:
removal:
# GROUND 将光源作为物品掉落,INVENTORY 直接送入背包,DESTROY 无痕销毁
drop-mode: GROUND
安装
- 需要 Paper 26.2 或 26.3 和 Java 25+。
- 将
UnseenLight-x.y.jar 放入 plugins/ 目录并重启服务器。
构建
./gradlew build # -> build/libs/UnseenLight-<version>.jar(已着色,可直接部署)
./gradlew runServer # 启动本地 Paper 26.3 测试服务器并加载该插件
指标数据
匿名使用统计数据通过 bStats 收集。
服务器管理员可以在 plugins/bStats/config.yml 中全局选择退出。
许可证
MIT
UnseenLight is a Minecraft Paper plugin that adds craftable invisible light to survival:
players craft the vanilla light block (minecraft:light) on a workbench, place invisible light
sources in any dark spot and take them back down with a right click. Hidden lighting for builds,
farms and mob-proofing with no commands, no creative mode and no resource packs.
Crafting
8 glass panes + 1 torch -> 1 invisible light (level 15).
The shape, ingredients, yield and light level are all configurable. The recipe shows up in the
recipe book on join (also configurable).
Using it
| Action |
How |
| Place |
Hold the light item and right-click any dark spot - plain vanilla placement |
| Remove |
Hold any block and right-click the spot the light occupies; the light pops back as an item instead of your block being placed |
| Remove behind chests/doors |
Sneak + right-click (a plain click opens the container, like vanilla) |
| See placed lights |
Hold a light item - vanilla renders them - or run /ul show for a particle highlight |
A light block is invisible and has no hitbox, so your crosshair passes through it; aim so that
the block you are "placing" would land in the light's spot.
What the plugin guards against
minecraft:light is replaceable, so in vanilla almost anything overwrites it silently. UnseenLight
intercepts every such path - the light either pops properly (permission checked, land protection
consulted, item returned) or stays protected:
- block placement into the light's spot, from either hand, in any game mode;
- lava and powder snow buckets (water just waterlogs the light and is left alone);
- falling blocks landing in the spot (the item is compensated);
- the vanilla break while holding a light item (lights have no loot table - drop-mode is honoured);
- Crafter blocks crafting the recipe with nobody's permission to check (optional,
recipe.allow-crafter);
/minecraft:reload wiping plugin recipes (the recipe re-registers itself).
Land protection plugins (WorldGuard, GriefPrevention, …) are consulted through a BlockBreakEvent
before any light is removed, and CoreProtect-style loggers see the removal.
Commands
Alias: /ul
| Command |
Description |
Permission (default) |
/unseenlight reload |
Reload config.yml |
unseenlight.command.reload (op) |
/unseenlight give <players> [level] [amount] |
Give light items |
unseenlight.command.give (op) |
/unseenlight show |
Highlight nearby lights with particles |
unseenlight.command.show (everyone) |
Permissions
| Node |
Default |
Grants |
unseenlight.craft |
true |
Crafting the recipe (and seeing it in the recipe book) |
unseenlight.place |
true |
Placing light blocks |
unseenlight.remove |
true |
Taking placed lights down |
Configuration
Everything lives in config.yml: the recipe (shape, ingredients, yield, light level 0-15),
sounds and particles for placing/removing, the highlighter (radius, duration), and every player
message in MiniMessage format.
The most consequential switch is what a removed light turns into:
removal:
# GROUND drops the light as an item, INVENTORY sends it straight to the inventory, DESTROY removes it without a trace
drop-mode: GROUND
Installation
- Requires Paper 26.2 or 26.3 and Java 25+.
- Drop
UnseenLight-x.y.jar into plugins/ and restart.
Building
./gradlew build # -> build/libs/UnseenLight-<version>.jar (shaded, ready to deploy)
./gradlew runServer # spins up a local Paper 26.3 test server with the plugin
Metrics
Anonymous usage stats are collected via bStats.
Server owners can opt out globally in plugins/bStats/config.yml.
License
MIT
评论 0
登录后参与评分
还没有评论,来抢沙发吧