Збірка усіх плаґінів для WhoMine розроблених [MinersStudios](https://minersstudios.github.io).
/**
 * MSDecor: A Minecraft plugin with Decorations for WhoMine.
 */
package ua.com.minersstudios.whomine.decor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import lombok.*;
import org.bukkit.plugin.java.JavaPlugin;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class MSDecor extends JavaPlugin
{
	/**
	 * @return a single instance of the class
	 */
	@Getter
	private static MSDecor instance = new MSDecor();

	/**
	 * Ensure that required plugins are installed on a server, if not - disable itself.
	 */
	@Override
	public void onEnable()
	{
		List<String> expected_plugins_names = new ArrayList<>(Arrays.asList(
			"msCore", "CoreProtect"
		));

		for (String p : expected_plugins_names)
		{
			if (getServer().getPluginManager().getPlugin(p) == null)
			{
				getLogger().log(Level.SEVERE, "Required dependencies unsatisfied.");
				getServer().getPluginManager().disablePlugin(instance);
				break;
			}
		}
	}
}