mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-23 02:35:22 +01:00
Sync MConf at once on update. Also don't transfer 0 money on disband.
This commit is contained in:
parent
07ab309e1c
commit
a4ff2abd5c
@ -62,7 +62,9 @@ public class FactionsListenerEcon implements Listener
|
||||
if (oldFaction.getMPlayers().size() > 1) return;
|
||||
|
||||
// ... then transfer all money to the player.
|
||||
Econ.transferMoney(mplayer, oldFaction, mplayer, Money.get(oldFaction));
|
||||
double money = Money.get(oldFaction);
|
||||
if (money == 0) return;
|
||||
Econ.transferMoney(mplayer, oldFaction, mplayer, money);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
|
@ -45,6 +45,8 @@ public class UpdateUtil
|
||||
|
||||
// ... transfer the old uconf data over to the new mconf ...
|
||||
oldConf.transferTo(MConf.get());
|
||||
MConf.get().changed();
|
||||
MConf.get().sync();
|
||||
|
||||
// ... rename target collections ...
|
||||
Db db = MStore.getDb();
|
||||
|
Loading…
Reference in New Issue
Block a user