2014-08-20 03:36:23 +02:00
|
|
|
package mineplex.staffServer;
|
|
|
|
|
2017-08-02 18:44:35 +02:00
|
|
|
import java.util.UUID;
|
2017-02-25 07:35:46 +01:00
|
|
|
|
2018-01-06 22:50:36 +01:00
|
|
|
import net.minecraft.server.v1_8_R3.MinecraftServer;
|
|
|
|
|
2017-02-25 07:35:46 +01:00
|
|
|
import org.bukkit.Bukkit;
|
|
|
|
import org.bukkit.craftbukkit.v1_8_R3.CraftServer;
|
|
|
|
import org.bukkit.plugin.java.JavaPlugin;
|
|
|
|
import org.spigotmc.SpigotConfig;
|
|
|
|
|
2016-08-23 08:37:05 +02:00
|
|
|
import com.mojang.authlib.GameProfile;
|
2017-01-07 03:05:09 +01:00
|
|
|
|
2014-08-20 03:36:23 +02:00
|
|
|
import mineplex.core.account.CoreClientManager;
|
2015-06-20 10:43:38 +02:00
|
|
|
import mineplex.core.achievement.AchievementManager;
|
2018-01-07 06:07:01 +01:00
|
|
|
import mineplex.core.bonuses.BonusRepository;
|
2014-08-20 03:36:23 +02:00
|
|
|
import mineplex.core.command.CommandCenter;
|
2017-02-25 07:35:46 +01:00
|
|
|
import mineplex.core.common.Constants;
|
2014-08-21 22:55:09 +02:00
|
|
|
import mineplex.core.creature.Creature;
|
2016-06-08 01:33:03 +02:00
|
|
|
import mineplex.core.disguise.DisguiseManager;
|
2014-08-20 03:36:23 +02:00
|
|
|
import mineplex.core.donation.DonationManager;
|
2016-04-28 05:12:38 +02:00
|
|
|
import mineplex.core.elo.EloManager;
|
2018-01-07 03:32:38 +01:00
|
|
|
import mineplex.core.inventory.InventoryManager;
|
2014-08-20 03:36:23 +02:00
|
|
|
import mineplex.core.memory.MemoryFix;
|
|
|
|
import mineplex.core.monitor.LagMeter;
|
2014-08-21 22:55:09 +02:00
|
|
|
import mineplex.core.npc.NpcManager;
|
2016-06-08 01:33:03 +02:00
|
|
|
import mineplex.core.packethandler.PacketHandler;
|
2017-02-25 07:35:46 +01:00
|
|
|
import mineplex.core.portal.GenericServer;
|
2014-08-20 03:36:23 +02:00
|
|
|
import mineplex.core.portal.Portal;
|
2016-09-03 21:16:59 +02:00
|
|
|
import mineplex.core.powerplayclub.PowerPlayClubRepository;
|
2014-08-20 03:36:23 +02:00
|
|
|
import mineplex.core.preferences.PreferencesManager;
|
2015-12-11 07:24:59 +01:00
|
|
|
import mineplex.core.profileCache.ProfileCacheManager;
|
2014-11-14 04:14:43 +01:00
|
|
|
import mineplex.core.punish.Punish;
|
2014-08-21 22:55:09 +02:00
|
|
|
import mineplex.core.recharge.Recharge;
|
2014-09-30 21:20:01 +02:00
|
|
|
import mineplex.core.stats.StatsManager;
|
2014-08-20 03:36:23 +02:00
|
|
|
import mineplex.core.status.ServerStatusManager;
|
|
|
|
import mineplex.core.updater.FileUpdater;
|
2014-08-26 13:56:23 +02:00
|
|
|
import mineplex.core.updater.Updater;
|
2014-08-21 22:55:09 +02:00
|
|
|
import mineplex.staffServer.customerSupport.CustomerSupport;
|
2018-01-07 06:07:01 +01:00
|
|
|
import mineplex.staffServer.salespackage.SalesPackageManager;
|
2018-01-06 22:50:36 +01:00
|
|
|
|
|
|
|
import static mineplex.core.Managers.require;
|
2016-06-08 01:33:03 +02:00
|
|
|
|
2014-08-20 03:36:23 +02:00
|
|
|
public class StaffServer extends JavaPlugin
|
|
|
|
{
|
|
|
|
@Override
|
|
|
|
public void onEnable()
|
|
|
|
{
|
2017-01-07 03:05:09 +01:00
|
|
|
getConfig().addDefault(Constants.WEB_CONFIG_KEY, Constants.WEB_ADDRESS);
|
|
|
|
getConfig().set(Constants.WEB_CONFIG_KEY, getConfig().getString(Constants.WEB_CONFIG_KEY));
|
2014-08-20 03:36:23 +02:00
|
|
|
saveConfig();
|
2017-01-07 03:05:09 +01:00
|
|
|
|
2014-08-20 03:36:23 +02:00
|
|
|
//Static Modules
|
|
|
|
CommandCenter.Initialize(this);
|
2017-08-02 18:44:35 +02:00
|
|
|
CoreClientManager clientManager = new CoreClientManager(this);
|
2014-08-20 03:36:23 +02:00
|
|
|
CommandCenter.Instance.setClientManager(clientManager);
|
2014-08-21 22:55:09 +02:00
|
|
|
Recharge.Initialize(this);
|
2014-08-20 03:36:23 +02:00
|
|
|
|
2016-10-28 04:35:27 +02:00
|
|
|
DonationManager donationManager = require(DonationManager.class);
|
2014-08-20 03:36:23 +02:00
|
|
|
|
2017-01-07 03:05:09 +01:00
|
|
|
Punish punish = new Punish(this, clientManager);
|
2014-08-21 22:55:09 +02:00
|
|
|
new NpcManager(this, new Creature(this));
|
2014-12-14 08:30:39 +01:00
|
|
|
ServerStatusManager serverStatusManager = new ServerStatusManager(this, clientManager, new LagMeter(this, clientManager));
|
2016-08-23 08:37:05 +02:00
|
|
|
PreferencesManager preferenceManager = new PreferencesManager(this, null, clientManager);
|
2018-02-24 22:32:44 +01:00
|
|
|
|
2016-12-03 16:50:29 +01:00
|
|
|
Portal portal = new Portal();
|
2016-04-28 05:12:38 +02:00
|
|
|
EloManager eloManager = new EloManager(this, clientManager);
|
2016-09-03 21:16:59 +02:00
|
|
|
StatsManager statsManager = new StatsManager(this, clientManager);
|
2018-01-07 03:32:38 +01:00
|
|
|
InventoryManager inventoryManager = new InventoryManager(this, clientManager);
|
2018-01-07 06:07:01 +01:00
|
|
|
BonusRepository bonusRepository = new BonusRepository(this, null, donationManager);
|
2018-04-12 09:38:52 +02:00
|
|
|
new AchievementManager(statsManager, clientManager, donationManager, null, eloManager);
|
2018-09-03 21:38:31 +02:00
|
|
|
new MemoryFix(this);
|
|
|
|
new FileUpdater(GenericServer.HUB);
|
2016-06-08 01:33:03 +02:00
|
|
|
|
|
|
|
require(PacketHandler.class);
|
|
|
|
require(DisguiseManager.class);
|
2018-01-07 03:32:38 +01:00
|
|
|
|
2016-10-06 04:57:44 +02:00
|
|
|
PowerPlayClubRepository powerPlayRepo = new PowerPlayClubRepository(this, clientManager, donationManager);
|
2018-01-07 06:07:01 +01:00
|
|
|
|
|
|
|
SalesPackageManager salesPackageManager = new SalesPackageManager(this, clientManager, donationManager, inventoryManager, statsManager, powerPlayRepo);
|
|
|
|
|
|
|
|
new CustomerSupport(this, clientManager, donationManager, powerPlayRepo, inventoryManager, bonusRepository);
|
2014-08-26 13:56:23 +02:00
|
|
|
|
|
|
|
//Updates
|
2018-06-10 17:53:59 +02:00
|
|
|
require(Updater.class);
|
2014-08-26 13:56:23 +02:00
|
|
|
|
2016-10-04 04:06:36 +02:00
|
|
|
MinecraftServer.getServer().getPropertyManager().setProperty("debug", false);
|
|
|
|
SpigotConfig.debug = false;
|
2014-08-26 13:56:23 +02:00
|
|
|
|
|
|
|
Bukkit.getWorlds().get(0).setSpawnLocation(0, 102, 0);
|
2014-12-24 09:41:17 +01:00
|
|
|
|
2014-12-24 20:35:34 +01:00
|
|
|
((CraftServer)getServer()).setWhitelist(true);
|
2015-02-21 08:29:19 +01:00
|
|
|
|
2015-03-12 01:23:48 +01:00
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("377bdea3-badc-448d-81c1-65db43b17ea4"), "Strutt20"));
|
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("cf1b629c-cc55-4eb4-be9e-3ca86dfc7b9d"), "mannalou"));
|
2017-04-13 05:31:32 +02:00
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("492ff708-fe76-4c5a-b9ed-a747b5fa20a0"), "cherdy"));
|
2016-07-02 07:20:07 +02:00
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("6edf17d5-6bb2-4ed9-92e9-bed8e96fff68"), "BlueBeetleHD"));
|
2016-07-22 06:18:34 +02:00
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("a47a4d04-9f51-44ba-9d35-8de6053e9289"), "AlexTheCoder"));
|
2017-01-14 04:52:02 +01:00
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("63ad2db3-7c62-4a10-ac58-d267973190ce"), "Crumplex"));
|
2017-10-22 04:33:23 +02:00
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("a20d59d1-cfd8-4116-ac27-45d9c7eb4a97"), "Artix"));
|
2017-11-07 06:17:58 +01:00
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("852a8acf-7337-40d7-99ec-b08fd99650b5"), "KingCrazy_"));
|
2017-11-07 06:17:58 +01:00
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("d514022f-f6e3-4fb0-8d8c-90a6c2802711"), "sjsampson"));
|
2017-12-14 06:35:08 +01:00
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("627070a4-c6e0-46a4-a6b8-97f440dc37b4"), "Toki"));
|
2017-01-14 04:52:02 +01:00
|
|
|
|
2017-04-13 05:31:32 +02:00
|
|
|
((CraftServer)getServer()).getHandle().addOp(new GameProfile(UUID.fromString("a47a4d04-9f51-44ba-9d35-8de6053e9289"), "AlexTheCoder"));
|
2016-09-02 05:01:34 +02:00
|
|
|
((CraftServer)getServer()).getHandle().addOp(new GameProfile(UUID.fromString("cf1b629c-cc55-4eb4-be9e-3ca86dfc7b9d"), "mannalou"));
|
2015-07-09 18:07:16 +02:00
|
|
|
((CraftServer)getServer()).getHandle().addOp(new GameProfile(UUID.fromString("377bdea3-badc-448d-81c1-65db43b17ea4"), "Strutt20"));
|
2017-01-14 04:52:02 +01:00
|
|
|
((CraftServer)getServer()).getHandle().addOp(new GameProfile(UUID.fromString("6edf17d5-6bb2-4ed9-92e9-bed8e96fff68"), "BlueBeetleHD"));
|
2015-12-11 07:24:59 +01:00
|
|
|
|
2016-06-08 01:33:03 +02:00
|
|
|
require(ProfileCacheManager.class);
|
2014-08-20 03:36:23 +02:00
|
|
|
}
|
2017-10-22 04:33:23 +02:00
|
|
|
}
|