FlagWar 0.5.2: Targets on the Run!
Yet Another FlagWar Minor Release.
This one brings in a lot of internal changes to handle ones made upstream. The big changes of note include a new WarZone configuration section and relevant API endpoints; as well as the ability to prevent nations from toggling neutral (which was removed from Towny in 0.97.2.15.)
If you are using Towny 0.97.2.15+, or the recently release 0.97.3.0, please update to this release as soon as you can to avoid potential issues.
Changes (from CHANGELOG.md
)
Known-Issues
- Impossible to attack plots that have blocks placed at world build height. Marked as release-blocker for the next release (0.5.3, or, 0.6.0)
Added
-
VALIDATED_TOWNY_VER
version field:- Stores a manually-updated version string, containing the highest tested version of Towny that we've validated FlagWar for.
- If a newer version of Towny is run, a startup warning is issued from either of the following translation keys.
startup.check-towny.new.stable-release
- "Running Version of Towny released after FlagWar version. Are you up-to-date?"
startup.check-towny.new.pre-release
- "This Towny Pre-Release is newer than what we've tested. Please report any issues."
- _French and Spanish (MX) keys were machine-translated using bing translate. If you are familiar with either, feel free to drop in and make sure that the translation is appropriate. _
-
rules.nations_can_toggle_neutral
config setting. Default:FALSE
(#96, @LlmDl )- Replaces the now removed option that was in Towny. If False, prevents Towny from allowing Nations to become neutral.
- ℹ️It is important for users to not run FlagWar 0.5.1, or older, with Towny 0.97.2.15, or newer. The required API used for determining player-set neutrality in older releases is no longer present in newer Towny versions.
-
WarZone Configuration Section and Enhancements
(#88, @LlmDl )- Bumps Config version to 1.5
- New Config section 'warzone' containing the following keys:
warzone.editable_materials
(list)- List of materials that can be interacted with in war zones; Or, alternatively, cannot be interacted with.
- Accepts wildcards
*
and negations-{material}
.
warzone.item_use
(boolean)- Enables / Disables item usage in war_zones.
warzone.switch
(boolean)- Enables / Disables use of switches in war zones.
warzone.fire
(boolean)- Enables / Disables fire in war zones, add
-fire
towarzone.editable_materials
for complete fire protection when this is false.
- Enables / Disables fire in war zones, add
warzone.explosions
(boolean)- Enables / Disables explosions in war zones.
warzone.explosions_break_blocks
(boolean)- Enables / Disables explosions effecting Blocks.
- API: Enhanced FlagWarConfig
- Add
#setEditableMaterials()
(void) - Add
#isAllowingExplosionsInWarZone()
(bool) - Add
#isAllowingExplosionsToBreakBlocks()
(bool) - Add
#isAllowingFireInWarZone()
(bool) - Add
#isAllowingSwitchInWarZone()
(bool) - Add
#isAllowingItemUseInWarZone()
(bool) - Add
#isEditableMaterialInWarZone(Material)
(bool)
- Add
Changed
-
Build System
- Bumped SpotBugs-Annotations, Checkstyle, and IntelliJ Java Annotations
- Bumped Minimum Towny Version to 0.97.3.0. Same as validated version.
-
Refactored Holograph line population methods to reduce complexity. (commit: b08e1fa)
- This is a code-quality change, and should have no bearing on server operations.
-
Changed how time is tracked and calculated: (#89)
- FlagWar will now use Duration and Instant instead of the primitive
long
when storing cool-downs and timestamps.
- FlagWar will now use Duration and Instant instead of the primitive
-
Changed how payments / fees are calculated: Using BigDecimal to avoid IEEE754 floating-point inconsistencies. Scale to 2, use "Bankers' Rounding" (HALF_EVEN)
-
Refactored how Messaging.debug(string, args) functions: Use
Object...
overObject[]
, mimicking String.format().- Avoids passing args as
new Object[]{arg1,arg2,etc}
- Avoids passing args as
Fixed
- Fix
Cell#parse(WorldCoord)
(Also from #88)
Deprecated API ✂️
CellAttackEvent#getTime()
(long)CellAttackEvent#setTime()
(long)CellUnderAttack#formatTime(int, string)
(String)FlagWarAPI#getFlaggedTimestamp(Town)
(long)FlagWarConfig#getFlagWaitingTime()
(long)FlagWarConfig#getTimeBetweenFlagColorChange()
(long)FlagWarConfig#getTimeToWaitAfterFlagged()
(long)