Allow getting of managers in CustomerSupport, add InventoryManager

This commit is contained in:
Spencer 2018-01-04 19:01:41 -05:00 committed by Alexander Meech
parent 248472a5d3
commit 2fc792cf50

View File

@ -39,6 +39,7 @@ import mineplex.core.donation.DonationManager;
import mineplex.core.donation.Donor;
import mineplex.core.donation.repository.token.CoinTransactionToken;
import mineplex.core.donation.repository.token.TransactionToken;
import mineplex.core.inventory.InventoryManager;
import mineplex.core.powerplayclub.PowerPlayClubRepository;
import mineplex.core.powerplayclub.PowerPlayData;
import mineplex.core.stats.PlayerStats;
@ -60,6 +61,8 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
private CoreClientManager _clientManager;
private DonationManager _donationManager;
private SalesPackageManager _salesPackageManager;
private InventoryManager _inventoryManager;
private CustomerSupportRepository _repository;
private PowerPlayClubRepository _powerPlayRepo;
@ -76,12 +79,13 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
_salesPackageManager = salesPackageManager;
_repository = new CustomerSupportRepository(getPlugin());
_powerPlayRepo = powerPlayRepo;
_inventoryManager = Managers.require(InventoryManager.class);
_allowWeatherChange = true;
Bukkit.getWorlds().get(0).setStorm(false);
_allowWeatherChange = false;
addCommand(new checkCommand(this));
addCommand(new CheckCommand(this));
addCommand(new checkBonusCommand(this));
addCommand(new checkOwnsPackageCommand(this));
addCommand(new ListPPCCommand(this, _powerPlayRepo));
@ -99,6 +103,26 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
PermissionGroup.SUPPORT.setPermission(Perm.JOIN_SERVER, true, true);
}
public CoreClientManager getClientManager()
{
return _clientManager;
}
public CustomerSupportRepository getRepository()
{
return _repository;
}
public DonationManager getDonationManager()
{
return _donationManager;
}
public InventoryManager getInventoryManager()
{
return _inventoryManager;
}
@EventHandler
public void Join(PlayerJoinEvent event)
{