TownyRoads
为 Towny 添加道路。
该插件试图通过给予连接城镇的玩家部分领地保护及其他奖励,来鼓励玩家在不同城镇之间建造道路。
需要安装 Towny。 MapTowny、squaremap 和 RoadSpeedMounts 作为可选依赖项支持。
MapTowny
MapTowny 允许在 dynmap 上显示道路。
RoadSpeedMounts
RoadSpeedMounts 允许在道路上和道路外拥有不同的移动速度。
Wiki
TownyRoads 为 Towny 世界添加道路功能。
创建道路
首先需要创建两个城镇之间的道路。
/tr create <town> 会在你的城镇和你指定的城镇之间创建一条道路。
另一个城镇需要接受你的道路邀请:/tr accept <road>。
随后你需要通过进入两个城镇之间的每个区块并领取它们来认领道路区域:/tr claim <road>。
一旦你连接了两个城镇且另一个城镇已同意加入道路,你可以验证道路:/tr validate <road>。
如果道路存在问题,聊天栏会给出具体说明,并在修复后允许你再次进行验证。
在此之前,道路不会产生任何效果。一旦道路被验证通过,它就开始生效。
限制
道路长度不能超过 1000 个区块。 道路长度不能超过两城镇间最短路径距离的 2 倍。
道路效果
领地保护
非道路所属城镇的玩家无法在道路区块上进行大量的破坏或建造行为。一旦他们放置或破坏了 10 个方块,每想再放置或破坏一个新方块,都需要等待 1 分钟。 这使得伏击仍然可行,但大规模的破坏将变得极其耗时。 箱子或门可以无限制地打开;请勿将道路用作城镇领地的延伸。
确保为你负责建造道路的居民授予 comayor 权限或具有 townyroads.claimed.ownroad.* 权限的等级。
维护费用
连接到其首都的城镇,维护费用减少 50%。 连接到其他国家城镇的首都,维护费用会降低,若所有国家城镇均已连接,则最多降低 50%。同时这也使该国整体的维护费用最多降低 50%。
TownyWaypoints
可配置 TownyWaypoints,使得玩家仅在城镇间存在道路时才能进行传送。
RoadSpeedMounts
如果服务器安装了 RoadSpeedMounts,马、驴、骡子、骆驼以及玩家将会获得速度加成。默认配置下,它们在道路上的移动速度是荒野中的 2 倍(例如,对于马而言,在可疑灰砾上的速度提升从 +30% 增加到 +60%)。
额外区块
每个连接的城镇都会为道路提供一些额外区块。 它为连接到道路的每个城镇的每个城镇等级提供 1 个额外区块。 同国家的城镇提供的额外区块数量翻倍(2 倍)。 盟国城镇提供的额外区块数量为 1.5 倍。 敌对国家城镇提供的额外区块数量为 0.5 倍。
一个城镇从所有连接城镇获得的额外区块总数不能超过 1000 个。 一个城镇的额外区块数量不能超过其普通区块数量。
延长道路
要延长道路,你需要在现有道路和目标城镇之间创建一条新道路。
目标城镇需要同意加入该道路。
然后你可以使用 /tr merge <road1> <road2> 合并这两条道路。要合并两条道路,你的城镇必须同时属于这两条道路。
通过合并多条新道路,你可以将多个城镇加入到道路中。
最终的道路需要使用 /tr validate <road> 再次进行验证。
城镇变为废墟
如果道路中的一个城镇变为废墟(或被移除),该城镇将从道路中移除,通往该城镇的那段道路也将被删除。
当一个城镇从有效的道路中被移除时,系统会尝试在移除后重新验证道路,但如果道路不符合要求,验证可能会失败。
通过认领 (/tr claim) 或取消认领 (/tr unclaim) 新的区域来重新进行验证。
如果道路最后两个城镇中的一个变为废墟,整条道路将被删除。从你的城镇到你自己城镇的道路并没有太大用处。
城镇退出道路
当城镇退出道路时,其对道路的影响与城镇变为废墟相同。
翻译
英文和法文翻译由我(Hydrolien)完成。欢迎提交拉取请求以添加新的语言。只需翻译一个配置文件即可。
TODO
- 要求道路区块中包含最低数量的可疑灰砾、灰砾、可疑沙或水才能通过验证。
- 修复手持物品打开箱子被视为交互而非开关的问题。
- 修复因 PlayerInteractEvent 导致破坏方块被计数两次的问题。
- 添加自动认领命令:每次玩家进入新区块时自动认领新区块的命令。当道路达到最大区块数或玩家离开服务器时停止。
统计数据
构建、测试与部署
欢迎提交功能请求或拉取请求。建议在发送拉取请求之前先创建一个 Issue 讨论新功能。
构建
克隆 仓库 git clone git@github.com:Mvndi/TownyRoads.git
使用 ./gradlew assemble 进行构建。插件 .jar 文件将位于 build/libs/ 目录中。
测试
你可以使用 ./gradlew runServer 直接在 Minecraft 服务器中测试插件。
你也可以通过将 .jar 文件放入 plugins/ 目录来在其他服务器上试用。
你可能需要更新插件配置以适应你的需求。
部署
发布到 GitHub Releases、Hangar 和 Modrinth
向 Git 推送标签以触发 GitHub Action 发布流程,这将创建一个新的 GitHub Release 并发布到 Hangar 和 Modrinth。
git tag 1.2.3
git push --tags
发布到 Maven Central
需要在 ~/.gradle/gradle.properties 中配置 ossrhUsername 和 ossrhPassword
./gradlew clean publish
./gradlew jreleaserDeploy
发布的库可在 Maven Central 获取。
TownyRoads
Add roads to Towny.
This plugin tries to encourage players to build roads between towns by giving them partial claim protection & other bonuses for connected towns.
Towny is required. MapTowny, squaremap & RoadSpeedMounts are supported as optional dependencies.
MapTowny
MapTowny allows roads to be displayed on the dynmap.
RoadSpeedMounts
RoadSpeedMounts allows for different speeds on roads and outside roads.
Wiki
TownyRoads adds roads to a Towny world.
Creating a road
Roads need to be created between 2 towns first.
/tr create <town> creates a road between your town and the one you specify.
The other town needs to accept your road invite: /tr accept <road>.
You then need to claim the area of the road by moving into each chunk between the 2 towns and claiming it: /tr claim <road>.
Once you have connected both towns and the other town has accepted to join the road, you can validate the road: /tr validate <road>.
If something is wrong with the road, you will have an explanation of what is wrong in chat and will be able to validate again once the road is fixed.
Until then, the road has no effect. Once the road is validated, it starts having effects.
Limits
Roads can't be more than 1000 chunks long. Roads can't be longer than 2 times the distance of the shortest path between the 2 towns.
Road effects
Claim protection
Players who are not part of the road towns won't be able to break or build much on the road chunks. Once they have placed or broken 10 blocks, they need to wait 1 minute for each new block they want to place or break. This makes ambushes still possible but makes major grief too time-consuming. Chests or doors can be opened without limitation; do not use roads as an extension of a town.
Make sure to give comayor or a rank with the townyroads.claimed.ownroad.* permission to your residents who are supposed to build the roads.
Upkeep
A town connected to its capital pays 50% less upkeep. A capital connected to other nation towns pays less upkeep, up to 50% if all nation towns are connected. It also makes the nation pay up to 50% less upkeep.
TownyWaypoints
TownyWaypoints can be configured to allow players to travel only if there are roads between the towns.
RoadSpeedMounts
If RoadSpeedMounts is on the server, horses, donkeys, mules, camels and players will be faster. The default config makes them 2 times faster on roads than in wilderness for the same blocks they are moving on (from +30% to +60% on suspicious gravel for horses, for example).
Bonus chunks
Each connected town provides some bonus chunks to the road. It provides 1 chunk per town level of each town connected to the road. Same-nation towns provide 2 times more bonus chunks. Ally nation towns provide 1.5 times more bonus chunks. Enemy nation towns provide 0.5 times more bonus chunks.
A town can't have more than 1000 bonus chunks from all connected towns. A town can't have more bonus chunks than regular chunks.
Extending a road
To extend a road, you need to create a new road between the road and the town you want to be included in the road.
They need to accept joining the road.
Then you can merge both roads with /tr merge <road1> <road2>. To merge 2 roads, your town needs to be part of both roads.
By merging several new roads, you can add several towns to the road.
The final road needs to be validated once again with /tr validate <road>.
Towns falling into ruins
If one of the towns of a road falls into ruins (or gets removed), the town will be removed from the road, and the part of the road that was going to that town will be removed.
When a town is removed from a valid road, it tries to validate it again once the town has been removed, but it might not work if the road does not match the requirements.
Claim or unclaim (/tr unclaim) new areas to validate it again.
If one of the 2 last towns of the road falls into ruins, the road will be deleted. A road going from your town to your town isn't that useful.
Town leaving the road
When a town leaves a road, it has the same effect on the road as if the town fell into ruins.
Translations
Translations in English & in French are done by me (Hydrolien). Feel free to open a pull request to add new languages. There is a single config file to translate.
TODO
- Require a minimal amount of suspicious gravel, gravel, suspicious sand or water to be in the road chunks to validate it.
- Fix opening a chest with an item in hand being considered an interaction and not a switch.
- Fix breaking blocks being counted twice because of PlayerInteractEvent.
- Command to toggle auto-claim for a road that claims a new chunk each time the player enters a new chunk. It stops when the road has maxed out its chunks or if the player leaves the server.
Statistics
Build, Test & Deploy
Feature requests or pull requests are welcome. Consider creating an issue first to talk about your new feature before sending a pull request.
Build
Clone the repo git clone git@github.com:Mvndi/TownyRoads.git
Build with ./gradlew assemble. The plugin .jar file will be in build/libs/.
Test
You can test the plugin directly in a Minecraft server with ./gradlew runServer.
You can also try it on another server by placing the .jar in plugins/.
You might want to update the plugin config to fit your needs.
Deploy
To GitHub releases, Hangar & Modrinth
Push a tag to Git to trigger a GitHub Action release that will create a new GitHub release and publish to Hangar & Modrinth.
git tag 1.2.3
git push --tags
To Maven Central
Require ossrhUsername & ossrhPassword in ~/.gradle/gradle.properties
./gradlew clean publish
./gradlew jreleaserDeploy
The published lib will be available on Maven Central.
下载 TownyRoads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TownyRoads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TownyRoads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TownyRoads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TownyRoads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TownyRoads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TownyRoads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TownyRoads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TownyRoads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 TownyRoads
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
1.6.2
- 当被城镇过度占地时,有效道路可自动修复,并在大多数情况下保持有效状态
- 支持 26.3
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
一个高度兼容、功能完善且稳定的 TPA 模组
插件
创建用户友好的菜单以前往不同的世界
插件
更快速的直线轨道矿车、链式连接列车、熔炉机车,以及原版红石信号!
插件
传送至你或他人的商店!
插件
城镇现在可以要求建造具有特定功能的建筑
评论 0
登录后参与评分
还没有评论,来抢沙发吧