Improve compatibility with some economy plugins (hopefully) #385

This commit is contained in:
BuildTools
2016-01-24 20:07:09 +01:00
committed by Olof Larsson
parent 6bc16d25b1
commit f77750fc91
6 changed files with 42 additions and 36 deletions

View File

@@ -65,8 +65,13 @@ public class Faction extends Entity<Faction> implements EconomyParticipator, Nam
// We may move factions around during upgrades.
if (!Factions.get().isDatabaseInitialized()) return;
// Zero balance
Money.set(this, null, 0);
// NOTE: Existence check is required for compatibility with some plugins.
// If they have money ...
if (Money.exists(this))
{
// ... remove it.
Money.set(this, null, 0);
}
// Clean the board
BoardColl.get().clean();