描述
添加了近程和远程起爆陷阱。近程陷阱在玩家或实体接触时爆炸,远程陷阱在玩家点击时爆炸。远程陷阱具有不同的频道。支持 War 和 WorldGuard。完全可配置。
特性
- 近程陷阱
- 远程起爆陷阱
- 远程陷阱的不同频道
- War 支持
- WorldGuard 支持
- 完全可配置
- 自定义合成配方
- 拆除
- 对所有取消放置方块/破坏方块/爆炸的保护插件提供基本支持
- 如果无人触发陷阱,它们会在一定时间后爆炸(默认 40 秒,设为 0 则为无限)
- 如果该世界的 PVP 已禁用,陷阱不会在玩家身上爆炸
- 陷阱不会在放置陷阱的玩家身上爆炸(可配置)
- 设置/拆除陷阱时尊重保护插件
近程陷阱
- 用于放置近程陷阱的物品是耐久度为 999 的烟火之星(ID 402)。右键点击该物品于某个方块上即可在其上方放置陷阱
- 默认外观类似绊线(ID 132)
- 获取陷阱:使用 /getproximitytrap <数量> 命令或合成(请查看配置文件)
- 玩家踩到时会爆炸
- 实体踩到时会爆炸(或物品被投掷到其上,等等)。重要提示:目前仅通过压力板和连接的绊线生效
远程起爆陷阱
- 默认用于放置远程起爆陷阱的物品是耐久度为 999 的下界之星(ID 399)。右键点击即可放置陷阱。
- 潜行左键点击会引爆所有已放置的陷阱
- 外观如花盆(ID 140)。
- 获取陷阱:使用 /getremotetrap <数量> 命令或合成(请查看配置文件)
- 至少需要 2 个陷阱才能放置,最后一个始终用于起爆
- 可同时放置的陷阱数量有限制(可配置)
频道
- 新放置的陷阱将获得玩家当前选定的频道
- 右键点击已放置的远程陷阱并Shift+右键可选择该陷阱的频道
- 在其他地方 Shift+右键可选择玩家(起爆器)频道
- 当玩家频道与陷阱频道相等的所有陷阱将同时爆炸
- 选择“全部”玩家频道可无视频道引爆所有陷阱
- 选择“单个”玩家频道可无视频道按顺序依次引爆陷阱
WorldGuard 支持
- 如果玩家无法在区域内建造,则无法在该区域放置/拆除/解除陷阱
- 如果 'TNT' 标志被禁用,则无法在该区域放置陷阱
- 如果 'other explosion'(其他爆炸)标志被禁用,则陷阱不会在该区域爆炸
- 如果 'PVP' 标志被禁用,则陷阱不会在区域内的玩家身上爆炸(延迟爆炸仍会发生)
- 管理员可以在任何地方放置陷阱
War 支持
- 如果 'friendly-fire'(友军伤害)已关闭,则陷阱不会在队友身上爆炸
- 陷阱不能放置在出生点/旗帜区/战争枢纽等区域
- 陷阱可以放置在自定义装备栏中(使用配置的道具 ID 和耐久度)
- 如果 'PVP' 已禁用,则陷阱不会在区域内的玩家身上爆炸(延迟爆炸仍会发生)
如果发生冲突,插件的优先级顺序为 Warzone -> WorldGuard 区域 -> 世界 PVP 设置
关于 explodeOnSelf 配置选项的陷阱行为如下所示:
(true = 爆炸, false = 消失)
teamPlayer selfInWarzone selfOutside
selfOff/friendlyFireOn true false false
selfOn/friendlyFireOff false false true
selfOn/friendlyFireOn true true true
selfOff/friendlyFireOff false false false
自定义合成配方
请查看配置页面以获取默认配方。
基本上,您通过为每个槽位指定一种材料来定义配方。您可以使用任意多种不同的材料,只需将它们添加到配置文件中即可。请记住遵循列表和关联列表的 YAML 语法,否则将无法工作。例如,YAML 特殊字符如 "*" 或 "#" 应该用引号括起来:
proximityCraftShape:
- "X#X"
- "#*#"
- "X#X"
proximityCraftMaterials:
"*": 46 # TNT
"#": 289 # 硫磺
X: 1 # 石头
拆除
- 如果 defusingEnabled 为 true,陷阱的行为会发生变化。玩家必须站在陷阱附近才能移除或拆除它(可配置,将其更改为 > 4 以禁用此功能)
- 如果玩家尝试在不拆除的情况下移除陷阱,它会爆炸(始终如此,例外情况:禁用了 'other-explosion' 标志的 WorldGuard 区域或其他取消爆炸的插件)。
- 拆除方式如下:装备拆除物品并在陷阱上按住右键直到拆除完成
- 如果拆除过程中断,玩家必须重新开始
- 已拆除的陷阱有几率掉落陷阱本体
- 可配置为仅在潜行时生效
命令
- /setplacingitem <ItemID>
将邻近放置物品更改为 <ItemID>
- /settrapblock <BlockD>
将邻近陷阱方块更改为 <BlockID>
- /getproximitytrap <amount>
给予你 <amount> 个邻近陷阱
- /getremotetrap <amount>
给予你 <amount> 个远程陷阱
权限
- explosivetraps.*:
description: 授予所有 ExplosiveTraps 操作的访问权限
- explosivetraps.place:
description: 允许放置陷阱
default: true
- explosivetraps.setplacingitem:
description: 允许使用 /setplacingitem
default: op
- explosivetraps.settrapblock:
description: 允许使用 /settrapblock
default: op
- explosivetraps.getproximitytrap:
description: 允许通过命令获取邻近陷阱
default: op
- explosivetraps.getremotetrap:
description: 允许通过命令获取远程陷阱
default: op
待办事项
- 添加本地化
- 添加可用信道的可视化显示
- 添加击杀计数器
- 使实体接触机制适用于其他方块
- 添加粘性陷阱及其他变体
- 使陷阱持久化
- 添加 Residence 支持(部分已实现)
- 使 WG 非 PVP 区域在战争区域中生效
- 添加更多权限
- 添加更多配置命令
注意事项
- 陷阱不具备持久性,服务器关闭后它们将不再工作,但方块仍然保留
- 邻近陷阱对压力板和连接的红石中继器之外的方块上的实体无效
配置
视频
v0.6 功能演示:
查看我的其他插件:ArrowMux
源代码
Description
Adds proximity and remote detonator traps. Proximity traps explode on player or entity contact, remote traps explode on player click. Remote traps have different channels. Has War and WorldGuard support. Fully configurable.
Features
- Proximity traps
- Remote detonator traps
- Different channels for remote traps
- War support
- WorldGuard support
- Fully configurable
- Custom crafting recipes
- Defusing
- Basic support for all protection plugins which cancel block placing / block destroying / explosions
- Traps will explode after a certain amount of time if noone stepped on it (default 40s, change to 0 for infinity)
- Traps don't explode on players if PVP in that world is disabled
- Traps don't explode on the player who placed the trap (configurable)
- Setting/destroying traps respect protection plugins
Proximity traps
- Item for playing proximity traps is Firework Star (ID 402) with durability 999. Right-clicking with that item on a block places a trap above
- Looks like tripwire by default (ID 132)
- Obaining traps: /getproximitytrap <amount> or crafting (check configuration)
- Explode if a player steps on it
- Explode if a entity steps on it (or items are thrown on it, etc). Important: atm this just works with pressure plates and conntected tripwire
Remote detonator traps
- Default item for placing remote detonator traps is Nether Star (ID 399) with durability 999. Righ-clicking places a trap.
- Left-clicking while sneaking detonates all placed traps
- Looks like a flower pot (ID 140).
- Obaining traps: /getremotetrap <amount> or crafting (check configuration)
- Needs at least 2 traps to place traps, last one is always used fo detonating
- Configurable limit of simultaneously placed traps
Channels
- Newly placed traps get the currently selected player channel
- Shift+rightclick on a placed remote trap to select channel of that trap
- Shift+rightclick somewhere else to select player (detonator) channel
- All traps where player channel equals trap channel explode simultaneously
- Select 'All' player channel to detonate all traps regardless of channel
- Select 'Single' player channel to detonate traps chronologically one by one regardless of channel
WorldGuard support
- Traps can't be placed/destroyed/defused in regions where the player cannot build
- Traps can't be placed in regions where 'TNT' flag is disabled
- Traps don't explode in regions where 'other explosion' flag is disabled
- Traps don't explode on players in regions where 'PVP' flag is disabled (delayed explosion still happens)
- Ops can place traps everywhere
War support
- Traps don't explode on team players if 'friendly-fire' is off
- Traps can't be placed on spawn/flag/warhub/etc
- Traps can be placed in custom loadouts (use configured item ID and configured item durability)
- Traps don't explode on players in zones where 'PVP' is disabled (delayed explosion still happens)
Precedence of plugins is Warzone -> WorldGuard region -> World PVP setting if any conflicts happen
behaviour of traps in respect to explodeOnSelf config option looks like this:
(true = explodes, false = vanishes)
teamPlayer selfInWarzone selfOutside
selfOff/friendlyFireOn true false false
selfOn/friendlyFireOff false false true
selfOn/friendlyFireOn true true true
selfOff/friendlyFireOff false false false
Custom crafting recipes
Check the configuration page for the default recipes.
Basically you define the recipe by giving one material per slot. You can use as many different materials as you like, you just have to add them to the config. Please remember to follow the list and associatve list YAML syntax or it won't work. For example YAML special characters like "*" or "#" should be quoted:
proximityCraftShape:
- "X#X"
- "#*#"
- "X#X"
proximityCraftMaterials:
"*": 46 # tnt
"#": 289 # sulphur
X: 1 # stone
Defusing
- If defusingEnabled is true the behaviour of traps changes. Players have to stand near the trap to remove or defuse it (configurable, change to > 4 to disable that feature)
- If a player attempts to remove a trap without defusing it, it will explode (always, exception: WorldGuard regions with 'other-explosion' flag disabled or other plugins which cancel explosions).
- Defusing works as following: equip the defusing item and hold right-click on the trap till it is defused
- If defusing gets interrupted the player has to start over
- Defused traps can drop the trap with certain chance
- Can be configured to work only while sneaking
Commands
- /setplacingitem <ItemID>
Changes proximity placing item to <ItemID>
- /settrapblock <BlockD>
Changes proximity trap block to <BlockID>
- /getproximitytrap <amount>
Gives you <amount> of proximity traps
- /getremotetrap <amount>
Gives you <amount> of remote traps
Permissions
- explosivetraps.*:
description: gives access to all ExplosiveTraps actions
- explosivetraps.place:
description: allows placing traps
default: true
- explosivetraps.setplacingitem:
description: allows using /setplacingitem
default: op
- explosivetraps.settrapblock:
description: allows using /settrapblock
default: op
- explosivetraps.getproximitytrap:
description: allows getting proximity traps via command
default: op
- explosivetraps.getremotetrap:
description: allows getting remote traps via command
default: op
Todo
- add localization
- add visualization of available channels
- add kill counter
- make entity contact work with other blocks
- add sticky traps, more variants
- make traps persistent
- add residence support (partly implemented)
- make WG non-PVP zones work in War zones
- add more permissions
- add more commands for configuration
Caveats
- Traps are not persistent, they don't work anymore after shutdown, but the blocks are still there
- Proximiy traps don't work on entities on blocks other than pressure plates and conntected tripwire
Configuration
Videos
v0.6 feature demonstration:
check out my other plugin: ArrowMux
Source
评论 0
登录后参与评分
还没有评论,来抢沙发吧