SpawnProtectionTweaks
添加游戏内出生点保护设置调整功能
本模组允许 Fabric 服务器动态更改出生点保护设置,从而覆盖原版配置。
服务端
该模组可在服务器和客户端上使用,但无需在客户端安装。
行为上的唯一区别是兼容的客户端不受 en_us 语言环境限制,
可根据其选择的语言获取翻译。
自 0.4 版本起,情况已不再如此。服务器将检测客户端设置的語言并使用它来翻译消息。
目前仅支持 en_us。
由于与特定版本的 fabric-api 存在不兼容性问题,该功能已被搁置。
0.4 版本引入了该功能,0.4.1 版本移除了它。
版本支持
随着 1.18 版本的发布,1.17 版本的支持将持续到 2022 年 1 月底,
潜在的错误修复将持续到 2022 年 3 月底。
权限
SpawnProtectionTweaks 支持与 LuckPerms 等权限模组兼容,也支持其他实现 Fabric Permission API 的模组。
权限节点格式为 spawnprotectiontweaks.<subcommand>.<operation>,例如 spawnprotectiontweaks.dimensions.list。
存在一个覆盖权限,允许玩家绕过出生点保护:
spawnprotectiontweaks.override。
本模组采用 MIT 许可证 授权。
命令
启用/禁用出生点保护
- /spawnprotectiontweaks enabled set <true/false>
- /spawnprotectiontweaks enabled query
配置出生点保护的半径
- /spawnprotectiontweaks dimensions radius set <dimensionid> <value>
- /spawnprotectiontweaks dimensions radius query [dimensionid]
配置出生点保护的中心
- /spawnprotectiontweaks dimensions centre set <dimensionid> <value>
- /spawnprotectiontweaks dimensions centre query [dimensionid]
配置操作栏提示
- /spawnprotectiontweaks dimensions actionbar set <dimensionid> <true/false>
- /spawnprotectiontweaks dimensions actionbar query [dimensionid]
配置默认维度专属设置
- /spawnprotectiontweaks dimensions set <actionbar/radius/centre> <value>
- /spawnprotectiontweaks dimensions query <actionbar/radius/centre>
列出所有未使用默认配置的维度
- /spawnprotectiontweaks dimensions list
列出所有维度
- /spawnprotectiontweaks dimensions list all
如果希望使用,大多数查询命令也可以在命令方块中运行。
配置文件
配置专属选项:
alias:为 spawnprotectiontweaks 命令设置一个可选别名
advancedEventOptions:切换模组使用基于新事件的系统,而非依赖原版来捕获操作(开发中!)
eventConfig(维度专属,仅在启用 advancedEventOptions 时生效):
preventAttackingBlocks:阻止在该维度攻击方块
preventUsingBlocks:阻止在该维度使用方块
preventAttackingEntities:阻止在该维度攻击实体
preventUsingEntities:阻止在该维度使用实体
preventUsingItems:阻止在该维度使用物品。若同时禁用 preventUsingBlocks 并启用 preventAttackingBlocks,此选项将允许玩家使用打火石但无法移除火焰。禁用此选项可能会导致不同步现象,当玩家尝试使用非无限附魔的弓时。
preventBreakingBlocks:阻止在该维度破坏方块
新的基于事件的系统使用了不同的权限系统:
spawnprotectiontweaks.interaction.<dimensionid>.<action>.<target>
例如:spawnprotectiontweaks.interaction.minecraft:overworld.use.block 或 spawnprotectiontweaks.interaction.minecraft:overworld.attack.player,不过我还没有对此进行彻底测试。
SpawnProtectionTweaks
Adds in-game spawn protection settings manipulation
This mod adds the ability for fabric servers to change spawn protection settings on the fly overriding the vanilla configuration.
Server-side
This mod can be used on both server and client however it is not required to install it on the client.
The only difference in behaviour is that compatible clients are not bound to the en_us locale
and can get translations based on their selected language.
Since version 0.4 this is no longer the case. The server will detect the client's set language and use it to translate the messages.
Currently, only en_us is supported though.
Due to incompatibilities with specific fabric-api versions that feature has been put on ice.
Version 0.4 introduced that feature, version 0.4.1 removed it.
Version support
With the release of 1.18, the 1.17 version will only be fully supported until the end of January 2022
with potential bugs being fixed until the end of March 2022.
Permissions
SpawnProtectionTweaks supports permissions mods like LuckPerms and other mods supporting the Fabric Permission API.
The permission nodes are formatted in the form spawnprotectiontweaks.<subcommand>.<operation>
I.e. spawnprotectiontweaks.dimensions.list
There is an override permission allowing players to bypass spawn protection:
spawnprotectiontweaks.override.
The mod is licensed under the MIT License
Commands
Enable / Disable Spawn Protection
- /spawnprotectiontweaks enabled set <true/false>
- /spawnprotectiontweaks enabled query
Configure the radius of the Spawn Protection
- /spawnprotectiontweaks dimensions radius set <dimensionid> <value>
- /spawnprotectiontweaks dimensions radius query [dimensionid]
Configure the centre of the Spawn Protection
- /spawnprotectiontweaks dimensions centre set <dimensionid> <value>
- /spawnprotectiontweaks dimensions centre query [dimensionid]
Configure the action bar alert
- /spawnprotectiontweaks dimensions actionbar set <dimensionid> <true/false>
- /spawnprotectiontweaks dimensions actionbar query [dimensionid]
Configure the default dimension specific config
- /spawnprotectiontweaks dimensions set <actionbar/radius/centre> <value>
- /spawnprotectiontweaks dimensions query <actionbar/radius/centre>
List all dimensions not using the default config
- /spawnprotectiontweaks dimensions list
List all dimensions
- /spawnprotectiontweaks dimensions list all
Most query commands should be usable in command blocks if anyone wishs to use them.
Config
Config exclusive options:
alias: sets an
optional alias to the spawnprotectiontweaks command
advancedEventOptions: Switches the mod to use a new event based system instead of relying on vanilla to catch the actions (in development!)
eventConfig (dimension specific, only active if advancedEventOptions is enabled):
preventAttackingBlocks: Prevents attacking blocks in the dimension
preventUsingBlocks: Prevents using blocks in the dimension
preventAttackingEntities: Prevents attacking entities in the dimension
preventUsingEntities: Prevents using entities in the dimension
preventUsingItems: Prevents using items in the dimension. Disabling while also disabling preventUsingBlocks and enabling preventAttackingBlocks this will enable players to use flint & steel without being able to remove the fire. Disabling this might also cause desync when players try to use bows without infinity.
preventBreakingBlocks: Prevents breaking blocks in the dimension
The new event based system uses a different permission system:
spawnprotectiontweaks.interaction.<dimensionid>.<action>.<target>
for example: spawnprotectiontweaks.interaction.minecraft:overworld.use.block or spawnprotectiontweaks.interaction.minecraft:overworld.attack.player however I didn't thoroughly test this yet.
评论 0
登录后参与评分
还没有评论,来抢沙发吧