Skip to content

Commit

Permalink
Removed a way to cheat money with the landlord system
Browse files Browse the repository at this point in the history
  • Loading branch information
alex9849 committed May 6, 2020
1 parent 7918b94 commit 8c722c8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,17 @@ public void setPaybackPercentage(int paybackPercentage) {
if (this.isSubregion())
throw new IllegalArgumentException("Can't change this option for a Subregion!");
this.paybackPercentage = paybackPercentage;
if(this.paybackPercentage != 0)
this.setLandlord(null);
this.queueSave();
}

public void setLandlord(UUID landlord) {
if (this.isSubregion())
throw new IllegalArgumentException("Can't change this option for a Subregion!");
this.landlord = landlord;
if(landlord != null)
this.setPaybackPercentage(0);
this.queueSave();
}

Expand Down

0 comments on commit 8c722c8

Please sign in to comment.