Fix InventoryManager instantiation, remove 2fa (not needed on prod)
This commit is contained in:
parent
8d0220b0cc
commit
9fa37824fe
@ -20,6 +20,7 @@ import mineplex.core.creature.Creature;
|
||||
import mineplex.core.disguise.DisguiseManager;
|
||||
import mineplex.core.donation.DonationManager;
|
||||
import mineplex.core.elo.EloManager;
|
||||
import mineplex.core.inventory.InventoryManager;
|
||||
import mineplex.core.memory.MemoryFix;
|
||||
import mineplex.core.monitor.LagMeter;
|
||||
import mineplex.core.npc.NpcManager;
|
||||
@ -66,16 +67,16 @@ public class StaffServer extends JavaPlugin
|
||||
Portal portal = new Portal();
|
||||
EloManager eloManager = new EloManager(this, clientManager);
|
||||
StatsManager statsManager = new StatsManager(this, clientManager);
|
||||
InventoryManager inventoryManager = new InventoryManager(this, clientManager);
|
||||
new Chat(this, null, clientManager, preferenceManager, new AchievementManager(statsManager, clientManager, donationManager, null, eloManager), serverStatusManager.getCurrentServerName());
|
||||
new MemoryFix(this);
|
||||
new FileUpdater(this, portal, serverStatusManager.getCurrentServerName(), serverStatusManager.getRegion(), GenericServer.HUB);
|
||||
|
||||
require(PacketHandler.class);
|
||||
require(DisguiseManager.class);
|
||||
require(TwoFactorAuth.class);
|
||||
|
||||
|
||||
PowerPlayClubRepository powerPlayRepo = new PowerPlayClubRepository(this, clientManager, donationManager);
|
||||
new CustomerSupport(this, clientManager, donationManager, powerPlayRepo);
|
||||
new CustomerSupport(this, clientManager, donationManager, powerPlayRepo, inventoryManager);
|
||||
|
||||
//Updates
|
||||
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1);
|
||||
|
@ -1,19 +1,10 @@
|
||||
package mineplex.staffServer.customerSupport;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.YearMonth;
|
||||
import java.time.format.TextStyle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
@ -27,35 +18,23 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import mineplex.core.Managers;
|
||||
import mineplex.core.MiniPlugin;
|
||||
import mineplex.core.account.CoreClient;
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.account.permissions.Permission;
|
||||
import mineplex.core.account.permissions.PermissionGroup;
|
||||
import mineplex.core.common.currency.GlobalCurrency;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.NautHashMap;
|
||||
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.pet.repository.PetRepository;
|
||||
import mineplex.core.powerplayclub.PowerPlayClubRepository;
|
||||
import mineplex.core.powerplayclub.PowerPlayData;
|
||||
import mineplex.core.stats.PlayerStats;
|
||||
import mineplex.core.stats.StatsManager;
|
||||
import mineplex.serverdata.database.ResultSetCallable;
|
||||
import mineplex.staffServer.repository.SupportRepository;
|
||||
|
||||
public class CustomerSupport extends MiniPlugin
|
||||
{
|
||||
public enum Perm implements Permission
|
||||
{
|
||||
CHECK_BONUS_COMMAND,
|
||||
CHECK_COMMAND,
|
||||
CHECK_OWNS_PACKAGE_COMMAND,
|
||||
LIST_PPC_COMMAND,
|
||||
JOIN_SERVER,
|
||||
}
|
||||
|
||||
@ -71,12 +50,13 @@ public class CustomerSupport extends MiniPlugin
|
||||
|
||||
private boolean _allowWeatherChange = false;
|
||||
|
||||
public CustomerSupport(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, PowerPlayClubRepository powerPlayRepo)
|
||||
public CustomerSupport(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, PowerPlayClubRepository powerPlayRepo, InventoryManager inventoryManager)
|
||||
{
|
||||
super("Support", plugin);
|
||||
|
||||
_clientManager = clientManager;
|
||||
_donationManager = donationManager;
|
||||
_inventoryManager = inventoryManager;
|
||||
_repository = new SupportRepository();
|
||||
_powerPlayRepo = powerPlayRepo;
|
||||
_inventoryManager = Managers.require(InventoryManager.class);
|
||||
@ -94,10 +74,7 @@ public class CustomerSupport extends MiniPlugin
|
||||
private void generatePermissions()
|
||||
{
|
||||
|
||||
PermissionGroup.SUPPORT.setPermission(Perm.CHECK_BONUS_COMMAND, true, true);
|
||||
PermissionGroup.SUPPORT.setPermission(Perm.CHECK_COMMAND, true, true);
|
||||
PermissionGroup.SUPPORT.setPermission(Perm.CHECK_OWNS_PACKAGE_COMMAND, true, true);
|
||||
PermissionGroup.SUPPORT.setPermission(Perm.LIST_PPC_COMMAND, true, true);
|
||||
PermissionGroup.SUPPORT.setPermission(Perm.JOIN_SERVER, true, true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user