TownyAdvanced / TownyFlight

Flight plugin for Towny servers.
https://townyadvanced.github.io/
Other
23 stars 17 forks source link

Added an option to disable flight when an enemy player is in the town. #73

Open connorwally opened 6 months ago

connorwally commented 6 months ago

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.