Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solves for WarZoneListener being unused. #86

Merged
merged 2 commits into from
Oct 27, 2021

Conversation

LlmDl
Copy link
Member

@LlmDl LlmDl commented Oct 26, 2021

Brief Description:

Towny was never assigning TownBlockStatus#WARZONE in the
PlayerCacheUtil, because at some point it was made to only respect
EventWar.

This PR removes FlagWar's add/removes to TownyUniverse's #addWarZone and
#removeWarZone methods, which would trickle down into the TownyWorld
warzone map, affecting TownBlock#isWarZone.


Changes:

The above TownyWorld and TownyUniverse are due to be scrapped with the
EventWar revamp anyways, and FlagWarAPI#isUnderAttack already does a
great of tracking where FlagWar flags are placed.

The WarZoneListener#isFastFailing has been rejiggered to look for the
above FlagWar#isUnderAttack and instead of testing for a
TownBlockStatus#WARZONE, it is checking the PlayerCache if an ENEMY
status is returned, which should mean it will fail fast in many
scenarios.


Relevant FlagWar Issue tickets:


  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have read and agree to release my own changes that I
have submitted under the terms of the accompanying license (Apache-2.0). I guarantee that these
changes are mine and are not encumbered by any other license or restriction to the best of my
knowledge.

Towny was never assigning TownBlockStatus#WARZONE in the
PlayerCacheUtil, because at some point it was made to only respect
EventWar.

This PR removes FlagWar's add/removes to TownyUniverse's #addWarZone and
#removeWarZone methods, which would trickle down into the TownyWorld
warzone map, affecting TownBlock#isWarZone.

The above TownyWorld and TownyUniverse are due to be scrapped with the
EventWar revamp anyways, and FlagWarAPI#isUnderAttack already does a
great of tracking where FlagWar flags are placed.

The WarZoneListener#isFastFailing has been rejiggered to look for the
above FlagWar#isUnderAttack and instead of testing for a
TownBlockStatus#WARZONE, it is checking the PlayerCache if an ENEMY
status is returned, which should mean it will fail fast in many
scenarios.
@LlmDl LlmDl added this to the 0.5.1 milestone Oct 26, 2021
@TheFlagCourier TheFlagCourier merged commit ea6e543 into main Oct 27, 2021
@TheFlagCourier TheFlagCourier deleted the hotfix/warzonelistener branch October 27, 2021 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants