Mineplex2018-withcommit/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/StaffServer.java

94 lines
4.8 KiB
Java
Raw Normal View History

package mineplex.staffServer;
import java.util.UUID;
import mineplex.core.account.CoreClientManager;
import mineplex.core.achievement.AchievementManager;
import mineplex.core.antihack.AntiHack;
import mineplex.core.chat.Chat;
import mineplex.core.command.CommandCenter;
2014-08-21 22:55:09 +02:00
import mineplex.core.creature.Creature;
import mineplex.core.donation.DonationManager;
import mineplex.core.inventory.InventoryManager;
import mineplex.core.memory.MemoryFix;
import mineplex.core.monitor.LagMeter;
2014-08-21 22:55:09 +02:00
import mineplex.core.npc.NpcManager;
import mineplex.core.portal.Portal;
import mineplex.core.preferences.PreferencesManager;
import mineplex.core.punish.Punish;
2014-08-21 22:55:09 +02:00
import mineplex.core.recharge.Recharge;
import mineplex.core.stats.StatsManager;
import mineplex.core.status.ServerStatusManager;
import mineplex.core.updater.FileUpdater;
import mineplex.core.updater.Updater;
2014-08-21 22:55:09 +02:00
import mineplex.staffServer.customerSupport.CustomerSupport;
import mineplex.staffServer.salespackage.SalesPackageManager;
2015-11-10 09:01:39 +01:00
import net.minecraft.server.v1_8_R3.MinecraftServer;
import org.bukkit.Bukkit;
2015-11-10 09:01:39 +01:00
import org.bukkit.craftbukkit.v1_8_R3.CraftServer;
import org.bukkit.plugin.java.JavaPlugin;
2015-11-10 09:01:39 +01:00
import com.mojang.authlib.GameProfile;
public class StaffServer extends JavaPlugin
{
private String WEB_CONFIG = "webServer";
@Override
public void onEnable()
{
getConfig().addDefault(WEB_CONFIG, "http://accounts.mineplex.com/");
getConfig().set(WEB_CONFIG, getConfig().getString(WEB_CONFIG));
saveConfig();
String webServerAddress = getConfig().getString(WEB_CONFIG);
//Static Modules
CommandCenter.Initialize(this);
CoreClientManager clientManager = new CoreClientManager(this, webServerAddress);
CommandCenter.Instance.setClientManager(clientManager);
2014-08-21 22:55:09 +02:00
Recharge.Initialize(this);
DonationManager donationManager = new DonationManager(this, clientManager, webServerAddress);
Punish punish = new Punish(this, webServerAddress, clientManager);
2014-08-21 22:55:09 +02:00
new NpcManager(this, new Creature(this));
ServerStatusManager serverStatusManager = new ServerStatusManager(this, clientManager, new LagMeter(this, clientManager));
PreferencesManager preferenceManager = new PreferencesManager(this, clientManager, donationManager);
preferenceManager.GiveItem = false;
Portal portal = new Portal(this, clientManager, serverStatusManager.getCurrentServerName());
new Chat(this, clientManager, preferenceManager, new AchievementManager(new StatsManager(this, clientManager), clientManager, donationManager), serverStatusManager.getCurrentServerName());
new MemoryFix(this);
2015-01-23 08:18:38 +01:00
new FileUpdater(this, portal, serverStatusManager.getCurrentServerName(), serverStatusManager.getRegion());
AntiHack.Initialize(this, punish, portal, preferenceManager, clientManager);
new CustomerSupport(this, clientManager, donationManager, new SalesPackageManager(this, clientManager, donationManager, new InventoryManager(this, clientManager), new StatsManager(this, clientManager)));
//new Password(this, serverStatusManager.getCurrentServerName());
//Updates
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1);
MinecraftServer.getServer().getPropertyManager().setProperty("debug", true);
Bukkit.getWorlds().get(0).setSpawnLocation(0, 102, 0);
((CraftServer)getServer()).setWhitelist(true);
2015-02-21 08:29:19 +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"));
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("04a484d0-93e0-4777-a70c-808046917e3a"), "EvilEsther"));
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("adaa7613-6683-400f-baf8-7272c04b2cb4"), "Timmy48081_"));
2015-11-02 05:09:50 +01:00
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("57791647-93b1-4980-8835-7fddadd20eb8"), "xTheOnlyOreOx"));
2015-07-09 18:07:16 +02:00
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("efaf9a17-2304-4f42-8433-421523c308dc"), "B2_mp"));
2015-07-10 22:31:38 +02:00
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("492ff708-fe76-4c5a-b9ed-a747b5fa20a0"), "Cherdy8s"));
2015-07-26 17:49:35 +02:00
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("cf85f470-5248-4978-8208-435736fa136e"), "RustyRoo"));
2015-07-10 22:31:38 +02:00
2015-07-09 18:07:16 +02:00
((CraftServer)getServer()).getHandle().addOp(new GameProfile(UUID.fromString("377bdea3-badc-448d-81c1-65db43b17ea4"), "Strutt20"));
((CraftServer)getServer()).getHandle().addOp(new GameProfile(UUID.fromString("efaf9a17-2304-4f42-8433-421523c308dc"), "B2_mp"));
2015-07-26 17:49:35 +02:00
((CraftServer)getServer()).getHandle().addOp(new GameProfile(UUID.fromString("cf85f470-5248-4978-8208-435736fa136e"), "RustyRoo"));
}
}