Remove gold manager as a dependanacy to prevent an NPE

This commit is contained in:
Sam 2018-07-31 19:36:32 +01:00 committed by Alexander Meech
parent d41fb0c9b4
commit 52488d95a9
2 changed files with 4 additions and 8 deletions

View File

@ -309,7 +309,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan> implements IRelat
_blacklist = new ClansBlacklist(plugin);
_gearManager = gearManager;
_lootManager = new LootManager(gearManager, _goldManager);
_lootManager = new LootManager(gearManager);
_disguiseManager = Managers.get(DisguiseManager.class);
_npcManager = new NpcManager(plugin, Managers.get(Creature.class));
_condition = new SkillConditionManager(plugin);

View File

@ -10,14 +10,12 @@ import org.bukkit.inventory.ItemStack;
import mineplex.core.common.weight.WeightSet;
import mineplex.game.clans.clans.mounts.Mount.MountType;
import mineplex.game.clans.economy.GoldManager;
import mineplex.game.clans.items.GearManager;
public class LootManager
{
private final GearManager _gearManager;
private final GoldManager _goldManager;
private WeightSet<ILoot> _commonSet;
private WeightSet<ILoot> _rareSet;
private WeightSet<ILoot> _bossSet;
@ -25,11 +23,10 @@ public class LootManager
private WeightSet<ILoot> _raidSet;
private WeightSet<ILoot> _capturePointSet;
public LootManager(GearManager gearManager, GoldManager goldManager)
public LootManager(GearManager gearManager)
{
_gearManager = gearManager;
_goldManager = goldManager;
_commonSet = new WeightSet<>();
_rareSet = new WeightSet<>();
_bossSet = new WeightSet<>();
@ -165,7 +162,6 @@ public class LootManager
_undeadCitySet.add(1, new GearLoot(_gearManager));
// Gold
_undeadCitySet.add(5, new GoldLoot(_goldManager, 100, 1000));
_undeadCitySet.add(1, new GoldTokenLoot(5000, 10000));
}