Skip to content

Commit

Permalink
Polishing Commit #2
Browse files Browse the repository at this point in the history
- Remove unnecessary isRuined() tests in DailyTimerTask.
  - the town.hasUpkeep() is false for all NPC mayor'd towns.
  • Loading branch information
LlmDl committed Nov 29, 2020
1 parent 0c004d4 commit 3df7e7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/com/palmergames/bukkit/towny/tasks/DailyTimerTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ protected void collectNationTaxes(Nation nation) throws EconomyException {
* We are running in an Async thread so MUST verify all objects.
*/
if (universe.getDataSource().hasTown(town.getName())) {
if (town.isCapital() || !town.hasUpkeep() || town.isRuined())
if (town.isCapital() || !town.hasUpkeep())
continue;
if (town.getAccount().canPayFromHoldings(taxAmount)) {
// Town is able to pay the nation's tax.
Expand Down Expand Up @@ -450,7 +450,7 @@ public void collectTownCosts() throws EconomyException, TownyException {
*/
if (universe.getDataSource().hasTown(town.getName())) {

if (town.hasUpkeep() && !town.isRuined()) {
if (town.hasUpkeep()) {
double upkeep = TownySettings.getTownUpkeepCost(town);
double upkeepPenalty = TownySettings.getTownPenaltyUpkeepCost(town);
if (upkeepPenalty > 0 && upkeep > 0)
Expand Down

0 comments on commit 3df7e7d

Please sign in to comment.