SaberLLC / Saber-Factions

The Ultimate Factions Plugin
GNU General Public License v3.0
120 stars 98 forks source link

Faction setHome with econEnabled will withdraw from faction bank even if creating home fails when outside faction borders #276

Open r59q opened 1 month ago

r59q commented 1 month ago

Describe the bug The f setHome command will attempt to set faction home, and correctly deduct the specified amount from faction bank. If, however, the user is in the wilderness outside the faction, the faction home will automatically be un-set and the faction also loses their money.

To Reproduce Steps to reproduce the behavior:

  1. create a faction
  2. deposit some money
  3. attempt to setHome in the wilderness
  4. sethome deducts the money
  5. the home will be unset automatically

Expected behavior Preferably the check to validate the home position occurs before withdrawing money and then cancels the request such that the faction don't lose their money

Screenshots image

Server Version (please complete the following information):