ALLY - all players except town members will disable flight
NEUTRAL - all players except town and ally will disable flight
ENEMY - only enemied players will disable flight
A hashmap, enemiesInTown, is used to track towns with active enemies inside them.
If they do have active enemies inside the town, there is a new condition in, canFly, which will return false.
Town flight will automatically be disabled on an enemy entering, and re-enabled when the enemy leaves.
I tried to touch as little existing code as possible.
I have tested a reasonable amount on a private server with 2 accounts.
Depending on the config option:
A hashmap, enemiesInTown, is used to track towns with active enemies inside them. If they do have active enemies inside the town, there is a new condition in, canFly, which will return false.
Town flight will automatically be disabled on an enemy entering, and re-enabled when the enemy leaves.
I tried to touch as little existing code as possible. I have tested a reasonable amount on a private server with 2 accounts.