For the faction auto-claim feature to also correctly use the admin max power, like the standard /factions claim add does
Observed/actual behavior
When attempting to claim a new chunk, the text "Not enough faction power to claim chunk, autoclaim toggled off" is shown, even though there is enough max power
Steps/models to reproduce
Fill the maximum possible claimed chunks, and then add more via the admin command. Then, toggle on auto-claim and attempt to claim another chunk
Version
I built the mod myself using the current version of the code in the repository
To avoid this problem in other places, it may be a good idea to add a method that calculates the maxPower directly in the Faction class (e.g. it comes up for /factions info as well):
Expected behavior
For the faction auto-claim feature to also correctly use the admin max power, like the standard
/factions claim add
doesObserved/actual behavior
When attempting to claim a new chunk, the text "Not enough faction power to claim chunk, autoclaim toggled off" is shown, even though there is enough max power
Steps/models to reproduce
Fill the maximum possible claimed chunks, and then add more via the admin command. Then, toggle on auto-claim and attempt to claim another chunk
Version
I built the mod myself using the current version of the code in the repository
Other
I believe this could be fixed by changing the line: https://github.com/ickerio/factions/blob/a828619e044afe4821be38fa900a30803db53087/src/main/java/io/icker/factions/core/WorldManager.java#L37 to use the same code as detailed in the commit fixing #103: https://github.com/ickerio/factions/commit/cdbebb9e4fa4500f7a688e51b278df96017d9269
To avoid this problem in other places, it may be a good idea to add a method that calculates the
maxPower
directly in theFaction
class (e.g. it comes up for/factions info
as well):https://github.com/ickerio/factions/blob/a828619e044afe4821be38fa900a30803db53087/src/main/java/io/icker/factions/command/InfoCommand.java#L77