TownyAdvanced / Towny

Towny Advanced Minecraft plugin for Bukkit/Spigot.
https://townyadvanced.github.io
Other
518 stars 356 forks source link

Town Merging issues #7099

Closed BlueFyreMatt closed 9 months ago

BlueFyreMatt commented 9 months ago

What steps will reproduce the problem?

Towns cannot merge if they are in the same nation due to the calculation within the getMaxOutposts() method.

Given that remainingTown and succumbingTown have the same nation, their nation's outpost limit (nationOutposts) is the same. Therefore, the sum of their individual outpost limits (townOutposts + nationOutposts) will always be greater than the maximum allowed number of outposts (maxOutposts).

This error does still persist with towns that are not in the same nation and its likely there are further calculation issues for outposts when merging.

What is the expected output?

Towns should merge

Towny version

0.100.0.0

Server version

git-Purpur-2062 (MC: 1.20.1)*

Please use Pastebin.com to link the following files

.

LlmDl commented 9 months ago

Give this a shot: https://cdn.discordapp.com/attachments/669247087329673228/1176672940826312805/towny-0.100.0.5.jar?ex=656fb912&is=655d4412&hm=38574c290256f6407c2dc9346e1358c31d70909d562dad9b4992d7ecca229298&

BlueFyreMatt commented 9 months ago

Thank you, this does seem to fix the issue with outposts. We are experiencing issues with merge costs now but I'll close this and make a separate issue once I've had a chance to pinpoint the issue.

As always, thank you for being so quick with the fix!

LlmDl commented 9 months ago

If you enjoy quick fixes you should consider becoming a sponsor again. Only 1% of servers are sponsoring.