/*
 * Copyright (c) 2016 MCPhoton <http://mcphoton.org> and contributors.
 *
 * This file is part of the Photon Server Implementation <https://github.com/mcphoton/Photon-Server>.
 *
 * The Photon Server Implementation is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * The Photon Server Implementation is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
package org.mcphoton;

import java.io.File;
import org.mcphoton.block.BlockRegistry;
import org.mcphoton.entity.EntityRegistry;
import org.mcphoton.impl.block.PhotonBlockRegistry;
import org.mcphoton.impl.entity.PhotonEntityRegistry;
import org.mcphoton.impl.item.PhotonItemRegistry;
import org.mcphoton.impl.server.Main;
import org.mcphoton.impl.world.PhotonBiomeRegistry;
import org.mcphoton.item.ItemRegistry;
import org.mcphoton.network.PacketsManager;
import org.mcphoton.server.Server;
import org.mcphoton.world.BiomeRegistry;

/**
 * Implementation of the Photon's class, which is the centralized API core.
 *
 * @author TheElectronWill
 */
public final class Photon {

	public static final File MAIN_DIR = new File(System.getProperty("user.dir")), PLUGINS_DIR = new File(MAIN_DIR, "plugins"), WORLDS_DIR = new File(MAIN_DIR, "worlds");
	private static final BlockRegistry BLOCK_REGISTRY = new PhotonBlockRegistry();
	private static final ItemRegistry ITEM_REGISTRY = new PhotonItemRegistry();
	private static final EntityRegistry ENTITY_REGISTRY = new PhotonEntityRegistry();
	private static final BiomeRegistry BIOME_REGISTRY = new PhotonBiomeRegistry();
	private static final boolean consoleAdvanced = !System.getProperty("os.name").toLowerCase().contains("windows");

	private Photon() {
	}

	public static PacketsManager getPacketsManager() {
		return Main.serverInstance.packetsManager;
	}

	public static EntityRegistry getEntityRegistry() {
		return ENTITY_REGISTRY;
	}

	public static BlockRegistry getBlockRegistry() {
		return BLOCK_REGISTRY;
	}

	public static ItemRegistry getItemRegistry() {
		return ITEM_REGISTRY;
	}

	public static BiomeRegistry getBiomeRegistry() {
		return BIOME_REGISTRY;
	}

	public static boolean isClient() {
		return false;
	}

	public static boolean isServer() {
		return true;
	}

	public static boolean isConsoleAdvanced() {
		return consoleAdvanced;
	}

	public static String getVersion() {
		return "dev-alpha";
	}

	public static String getMinecraftVersion() {
		return "1.10";
	}

	public static File getMainDirectory() {
		return MAIN_DIR;
	}

	public static File getPluginsDirectory() {
		return PLUGINS_DIR;
	}

	public static Server getServer() {
		return Main.serverInstance;
	}
}

@@ -928,16 +928,109 @@
 o.File;%0A
+import java.util.concurrent.Executors;%0Aimport java.util.concurrent.ScheduledExecutorService;%0A
 import o
@@ -1821,16 +1821,199 @@
 rlds%22);%0A
+%09public static final File CONFIG_FILE = new File(MAIN_DIR, %22server_config.toml%22), ICON_PNG = new File(MAIN_DIR, %22server_icon.png%22), ICON_JPG = new File(MAIN_DIR, %22server_icon.png%22);%0A%0A
 %09private
@@ -2442,28 +2442,841 @@
 %22);%0A
-%0A%09private Photon() %7B
+%09private static final ScheduledExecutorService EXECUTOR_SERVICE = Executors.newScheduledThreadPool(2);//TODO configurable number of threads%0A%0A%09private Photon() %7B%0A%09%7D%0A%0A%09/**%0A%09 * Gets the Photon's ScheduledExecutorService, which is used to schedule tasks across multiple%0A%09 * threads.%0A%09 * %3Ch2%3EWhat kind of task may be submitted to this ExecutorService?%3C/h2%3E%0A%09 * %3Cp%3E%0A%09 * To achieve better performance, the submitted tasks:%0A%09 * %3Col%3E%0A%09 * %3Cli%3EMusn't be IO-bound, in order to avoid delaying the other tasks. Use an asynchronous IO API%0A%09 * instead of the ExecutorService.%3C/li%3E%0A%09 * %3Cli%3EMusn't be too short, in order to avoid creating too much overhead. It is advised to group many%0A%09 * small tasks together into one bigger task.%3C/li%3E%0A%09 * %3C/ol%3E%0A%09 * %3C/p%3E%0A%09 */%0A%09public static ScheduledExecutorService getExecutorService() %7B%0A%09%09return EXECUTOR_SERVICE;
 %0A%09%7D%0A

Add the ScheduledExecutorService + various files to Photon.java