2014-08-20 03:36:23 +02:00
|
|
|
package mineplex.staffServer;
|
|
|
|
|
2015-03-08 06:48:51 +01:00
|
|
|
import java.util.UUID;
|
|
|
|
|
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;
|
2015-02-15 00:09:42 +01:00
|
|
|
import mineplex.core.antihack.AntiHack;
|
2014-08-20 03:36:23 +02:00
|
|
|
import mineplex.core.chat.Chat;
|
|
|
|
import mineplex.core.command.CommandCenter;
|
2014-08-21 22:55:09 +02:00
|
|
|
import mineplex.core.creature.Creature;
|
2014-08-20 03:36:23 +02:00
|
|
|
import mineplex.core.donation.DonationManager;
|
2014-08-22 17:47:46 +02: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;
|
2014-08-20 03:36:23 +02:00
|
|
|
import mineplex.core.portal.Portal;
|
|
|
|
import mineplex.core.preferences.PreferencesManager;
|
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;
|
2014-08-22 17:47:46 +02:00
|
|
|
import mineplex.staffServer.salespackage.SalesPackageManager;
|
2014-08-26 13:56:23 +02:00
|
|
|
import net.minecraft.server.v1_7_R4.MinecraftServer;
|
2014-12-24 09:41:17 +01:00
|
|
|
import net.minecraft.util.com.mojang.authlib.GameProfile;
|
2014-08-20 03:36:23 +02:00
|
|
|
|
2014-08-26 13:56:23 +02:00
|
|
|
import org.bukkit.Bukkit;
|
2014-12-24 09:41:17 +01:00
|
|
|
import org.bukkit.craftbukkit.v1_7_R4.CraftServer;
|
2014-08-20 03:36:23 +02:00
|
|
|
import org.bukkit.plugin.java.JavaPlugin;
|
|
|
|
|
|
|
|
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);
|
2014-08-20 03:36:23 +02:00
|
|
|
|
2014-12-29 12:44:00 +01:00
|
|
|
DonationManager donationManager = new DonationManager(this, clientManager, webServerAddress);
|
2014-08-20 03:36:23 +02:00
|
|
|
|
2015-02-15 00:09:42 +01:00
|
|
|
Punish punish = new Punish(this, webServerAddress, 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));
|
2014-08-20 03:36:23 +02:00
|
|
|
PreferencesManager preferenceManager = new PreferencesManager(this, clientManager, donationManager);
|
|
|
|
preferenceManager.GiveItem = false;
|
|
|
|
|
2015-01-11 09:42:31 +01:00
|
|
|
Portal portal = new Portal(this, clientManager, serverStatusManager.getCurrentServerName());
|
2015-06-20 10:43:38 +02:00
|
|
|
new Chat(this, clientManager, preferenceManager, new AchievementManager(new StatsManager(this, clientManager), clientManager, donationManager), serverStatusManager.getCurrentServerName());
|
2014-08-20 03:36:23 +02:00
|
|
|
new MemoryFix(this);
|
2015-01-23 08:18:38 +01:00
|
|
|
new FileUpdater(this, portal, serverStatusManager.getCurrentServerName(), serverStatusManager.getRegion());
|
2015-02-15 00:09:42 +01:00
|
|
|
AntiHack.Initialize(this, punish, portal, preferenceManager, clientManager);
|
|
|
|
|
2014-11-25 22:25:13 +01:00
|
|
|
new CustomerSupport(this, clientManager, donationManager, new SalesPackageManager(this, clientManager, donationManager, new InventoryManager(this, clientManager), new StatsManager(this, clientManager)));
|
2014-12-24 09:41:17 +01:00
|
|
|
//new Password(this, serverStatusManager.getCurrentServerName());
|
2014-08-26 13:56:23 +02:00
|
|
|
|
|
|
|
//Updates
|
|
|
|
getServer().getScheduler().scheduleSyncRepeatingTask(this, new Updater(this), 1, 1);
|
|
|
|
|
|
|
|
MinecraftServer.getServer().getPropertyManager().setProperty("debug", true);
|
|
|
|
|
|
|
|
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"));
|
2015-03-08 06:48:51 +01:00
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("04a484d0-93e0-4777-a70c-808046917e3a"), "EvilEsther"));
|
2015-03-12 01:23:48 +01:00
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("adaa7613-6683-400f-baf8-7272c04b2cb4"), "Timmy48081_"));
|
2015-03-08 06:48:51 +01:00
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("2d5fd31b-0aa5-41db-a62d-a4611a24349a"), "ishh"));
|
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"));
|
|
|
|
((CraftServer)getServer()).getHandle().addWhitelist(new GameProfile(UUID.fromString("80f40f29-4d66-4355-a32f-01a65af2a14c"), "rl6"));
|
|
|
|
|
|
|
|
|
2015-04-22 06:35:41 +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-04-22 06:35:41 +02:00
|
|
|
((CraftServer)getServer()).getHandle().addOp(new GameProfile(UUID.fromString("2d5fd31b-0aa5-41db-a62d-a4611a24349a"), "ishh"));
|
2014-08-20 03:36:23 +02:00
|
|
|
}
|
|
|
|
}
|